BlueSkies for Unity  1.8.1
BlueSkies.SilverLining Class Reference

Helper class to allow direct calls to the SDK. More...

Inheritance diagram for BlueSkies.SilverLining:
BlueSkies.ISilverLining

Public Member Functions

bool initialize (string licensePath, string resourcePath, bool rightHanded, bool useDevelopmentLicense)
 
void shutdown ()
 
void update (IBlueSkiesTime time, Vector3 position)
 
bool isInitialized ()
 
uint sizeOfManagedLayers ()
 
uint sizeOfManagedClouds ()
 
ulong addCloudLayer (ICloudLayerDescriptor descriptor)
 
ulong addCloud (ICloudDescriptor descriptor)
 
bool removeCloudLayer (ulong id)
 
bool removeCloud (ulong id)
 
bool getChildClouds (ulong id, out ulong[] children)
 
bool getCloudPoints (ulong id, Vector3 origin, out float[] points)
 
bool getCloudVoxels (ulong id, Vector3 origin, out Voxel[] voxels)
 
ICloudDescriptor getCloudDescriptor (ulong id)
 
ICloudLayerDescriptor getCloudLayerDescriptor (ulong id)
 
bool getUniformFloat (string name, out float value)
 
bool getUniformVector3 (string name, out Vector3 value)
 
bool getUniformVector4 (string name, out Vector4 value)
 
bool getUniformMatrix (string name, out Matrix4x4 value)
 
string getLastError ()
 
Vector3 getSunDirection ()
 
Vector3 getSunPosition (float distance)
 
Vector3 getMoonDirection ()
 
Vector3 getMoonPosition (float distance)
 
int getMoonDay (int year, int month, int day)
 
bool getSunColor (out Color color)
 
bool getMoonColor (out Color color)
 
bool getAmbientColor (out Color color)
 
Color getHorizonColor (float yaw, float pitch)
 
void setTime (int year, int month, int day, int hour, int minute, double seconds, double zone, bool daylightSavings)
 
int addWind (double minAltitude, double maxAltitude, double windSpeed, double bearing)
 
bool removeWind (int id)
 
void clearWinds ()
 
void setLocation (double lat, double lon, double alt)
 
ulong getNewUID ()
 
bool setHaze (Color hazeColor, float depth, float density)
 

Detailed Description

Helper class to allow direct calls to the SDK.

Member Function Documentation

ulong BlueSkies.SilverLining.addCloud ( ICloudDescriptor  descriptor)

Attempts to add a new Cloud to the internal CloudManager

Parameters
[in]descriptorDescriptor of the cloud to add.
Returns
The UID of the new Cloud. If returned 0, then an error has occurred.

Implements BlueSkies.ISilverLining.

ulong BlueSkies.SilverLining.addCloudLayer ( ICloudLayerDescriptor  descriptor)

Attempts to add a new CloudLayer to the internal CloudManager

Parameters
[in]descriptorDescriptor of the cloud layer to add.
Returns
The UID of the new CloudLayer. If returned 0, then an error has occurred.

Implements BlueSkies.ISilverLining.

int BlueSkies.SilverLining.addWind ( double  minAltitude,
double  maxAltitude,
double  windSpeed,
double  bearing 
)

Adds wind element

Returns
The value of the Wind
Parameters
[in]minAltitudeMinimum altitude of wind
[in]maxAltitudeMaximum altitude of wind
[in]windSpeedSpeed of wind
[in]bearingDirection in degrees

Implements BlueSkies.ISilverLining.

void BlueSkies.SilverLining.clearWinds ( )

Removes all wind elements

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.getAmbientColor ( out Color  color)

Retrieves the ambient's color from the SDK.

Parameters
[out]color
Returns
TRUE if successful, else FALSE

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.getChildClouds ( ulong  id,
out ulong[]  children 
)

Retrieves the UID of the clouds that compose the specified layer.

Parameters
[in]idUID of the layer to retrieve child clouds from
[out]childrenArray containing the child cloud UIDs

Implements BlueSkies.ISilverLining.

ICloudDescriptor BlueSkies.SilverLining.getCloudDescriptor ( ulong  id)

Retrieves the CloudDescriptor for the cloud with the specified uid.

Returns
The CloudDescriptor or NULL if no cloud with that uid was found.

Implements BlueSkies.ISilverLining.

ICloudLayerDescriptor BlueSkies.SilverLining.getCloudLayerDescriptor ( ulong  id)

Retrieves the CloudLayerDescriptor for the cloud layer with the specified uid.

Returns
The CloudLayerDescriptor or NULL if no cloud layer with that uid was found.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.getCloudPoints ( ulong  id,
Vector3  origin,
out float[]  points 
)

Retrieves the spatial points that compose a puffy cloud.
The returned points are in the following format:

(x0, y0, z0, x1, y1, z1, ..., xN, yN, zN)

Where N = number of spatial points.

Parameters
[in]idUID of the cloud whose points to retrieve. Must be a cumulus style cloud.
[out]pointsArray of points that compose the cloud.
Returns
TRUE if points were successfully retrieved.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.getCloudVoxels ( ulong  id,
Vector3  origin,
out Voxel[]  voxels 
)

Retrieves SDK voxel information based on cloud type

/return If successful retrievel of voxel information

Parameters
[in]idCloud id
[in]originCenter position of Cloud
[out]voxlesArray of Voxels to store retrieved data

Implements BlueSkies.ISilverLining.

Color BlueSkies.SilverLining.getHorizonColor ( float  yaw,
float  pitch 
)

Retrieves the horizon color

Returns
The horizon color as a Vector3
Parameters
[in]yaw
[in]pitch

Implements BlueSkies.ISilverLining.

string BlueSkies.SilverLining.getLastError ( )

Retrieves the last recorded error encountered in the internal SilverLining instances.

Returns
The last error/caught exception.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.getMoonColor ( out Color  color)

Retrieves the moon's color from the SDK.

Parameters
[out]color
Returns
TRUE if successful, else FALSE

Implements BlueSkies.ISilverLining.

Vector3 BlueSkies.SilverLining.getMoonDirection ( )

Retrieves the moon's normalized direction vector

Returns
The moon's normalized direction vector.

Implements BlueSkies.ISilverLining.

Vector3 BlueSkies.SilverLining.getMoonPosition ( float  distance)

Retrieves the moon's position from the SDK.

Parameters
[in]Distanceto the moon
Returns
The moon's position.

Implements BlueSkies.ISilverLining.

ulong BlueSkies.SilverLining.getNewUID ( )
Returns
A new UID

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.getSunColor ( out Color  color)

Retrieves the sun's color from the SDK.

Parameters
[out]color
Returns
TRUE if successful, else FALSE

Implements BlueSkies.ISilverLining.

Vector3 BlueSkies.SilverLining.getSunDirection ( )

Retrieves the sun's normalized direction vector

Returns
The sun's normalized direction vector.

Implements BlueSkies.ISilverLining.

Vector3 BlueSkies.SilverLining.getSunPosition ( float  distance)

Retrieves the sun's position from the SDK.

Parameters
[in]Distanceto the sun
Returns
The sun's position.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.getUniformFloat ( string  name,
out float  value 
)

Attempts to retrieve the value of the specified uniform.

Parameters
[in]nameUniform name
[out]valueValue of the uniform
Returns
TRUE if successfully retrieved uniform with specified name.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.getUniformMatrix ( string  name,
out Matrix4x4  value 
)

Attempts to retrieve the value of the specified uniform.

Parameters
[in]nameUniform name
[out]valueValue of the uniform
Returns
TRUE if successfully retrieved uniform with specified name.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.getUniformVector3 ( string  name,
out Vector3  value 
)

Attempts to retrieve the value of the specified uniform.

Parameters
[in]nameUniform name
[out]valueValue of the uniform
Returns
TRUE if successfully retrieved uniform with specified name.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.getUniformVector4 ( string  name,
out Vector4  value 
)

Attempts to retrieve the value of the specified uniform.

Parameters
[in]nameUniform name
[out]valueValue of the uniform
Returns
TRUE if successfully retrieved uniform with specified name.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.initialize ( string  licensePath,
string  resourcePath,
bool  rightHanded,
bool  useDevelopmentLicense 
)

Initializes the internal SilverLining instance.

Parameters
[in]licensePathPath to AgileSrc license file.
[in]resourcePathPath to the SilverLining resources folder.
[in]rightHandedSet to TRUE to use a right-handed coordinate system (default is false).
[in]useDevelopmentLicenseDevelopment or release build.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.isInitialized ( )
Returns
TRUE if the internal SilverLining instance is initialized.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.removeCloud ( ulong  id)

Attempts to remove the Cloud with the specified UID from the internal CloudManager

Parameters
[in]idUID of the cloud to remove
Returns
TRUE if successful, else FALSE.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.removeCloudLayer ( ulong  id)

Attempts to remove the CloudLayer with the specified UID from the internal CloudManager

Parameters
[in]idUID of the cloud layer to remove
Returns
TRUE if successful, else FALSE.

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.removeWind ( int  id)

Removes a wind element

Returns
If we successfully removed a wind element
Parameters
[in]idId of wind element to remove

Implements BlueSkies.ISilverLining.

bool BlueSkies.SilverLining.setHaze ( Color  hazeColor,
float  depth,
float  density 
)

Sets haze color with given depth and density

Returns
If we successfully set the haze
Parameters
[in]hazeColorHaze color
[in]depthHaze depth
[in]densityHaze density

Implements BlueSkies.ISilverLining.

void BlueSkies.SilverLining.setLocation ( double  lat,
double  lon,
double  alt 
)

Sets location based on coordinates provided

Parameters
[in]latLatitude coordinate
[in]lonLongitude coordinate
[in]altAltitude of location

Implements BlueSkies.ISilverLining.

void BlueSkies.SilverLining.setTime ( int  year,
int  month,
int  day,
int  hour,
int  minute,
double  seconds,
double  zone,
bool  daylightSavings 
)

Sets the time of day for enviroment

Parameters
[in]yearYear
[in]monthMonth
[in]dayDay
[in]hourHour
[in]minuteMinute
[in]secondsSecond
[in]zoneTime Zone
[in]daylightSavingsIs it Daylight Savings

Implements BlueSkies.ISilverLining.

void BlueSkies.SilverLining.shutdown ( )

Shutsdown the internal SilverLining instance.

Implements BlueSkies.ISilverLining.

uint BlueSkies.SilverLining.sizeOfManagedClouds ( )
Returns
The number of Clouds managed by the internal CloudManager

Implements BlueSkies.ISilverLining.

uint BlueSkies.SilverLining.sizeOfManagedLayers ( )
Returns
The number of CloudLayers managed by the internal CloudManager

Implements BlueSkies.ISilverLining.

void BlueSkies.SilverLining.update ( IBlueSkiesTime  time,
Vector3  position 
)

Updates the internal SilverLining instance variables

Parameters
[in]timeCurrent BlueSkiesTime
[in]positionCurrent position of instance

Implements BlueSkies.ISilverLining.


The documentation for this class was generated from the following file: