IStar
Functions
SET_CID | 
|
STAR_ID | 
GetSID | 
| double | GetRadius | 
RED_RC | 
SetRadius | 
| const Matrix & | GetTransform | 
RED_RC | 
SetTransform | 
| void | GetPosition | 
RED_RC | 
SetRadiance | 
| void | GetRadiance | 
| void | GetFilteredRadiance | 
Detailed Description
- 
class 
IStar: public RED::IREDObject Celestial body interface for stars.
Stars are created from the ART::Factory using the CID_ARTStar identifier, or accessed from the ART::IWorld.
Public Functions
- 
SET_CID(CID_class_ARTIStar) 
- 
virtual ART::STAR_ID 
GetSID() const = 0 Access the star ID.
That ID is a ART::STAR_ID enumeration which differs from the RED::Object::GetID of the REDsdk class. It identifies whether we’re a built-in star (like the sun) or a custom star.
Returns: The star ID. 
- 
virtual double 
GetRadius() const = 0 Returns: The star radius in meters. 
- 
virtual RED_RC 
SetRadius(double iRadius) = 0 Setup the radius of this star.
Parameters: iRadius – The star radius, in meters. Returns: RED_OK if the operation has succeeded, RED_BAD_PARAM if iRadius is negative or zero,
RED_WORKFLOW_ERROR if the world simulation has already begun.
- 
virtual RED_RC 
SetTransform(const RED::Matrix &iMatrix) = 0 Setup the star transform matrix.
Parameters: iMatrix – The star transform matrix. Returns: RED_OK if the operation has succeeded, RED_WORKFLOW_ERROR if the world simulation has already begun.
- 
virtual void 
GetPosition(double oPosition[3]) const = 0 Access the star position, WCS.
Parameters: oPosition – The star position, WCS. This is the translation in ART::IStar::GetTransform. 
- 
virtual RED_RC 
SetRadiance(const double iRadiance[3]) = 0 Sets the RGB radiance of the star - outside of the influence of any atmosphere.
Parameters: iRadiance – RGB radiance of the star. Returns: RED_OK if the operation has succeeded, RED_WORKFLOW_ERROR if the world simulation has already begun.
- 
virtual void 
GetRadiance(double oRadiance[3]) const = 0 Gets the RGB radiance of the star.
Parameters: oRadiance – The returned RGB radiance of the star - outside of the influence of any atmosphere. 
- 
virtual void 
GetFilteredRadiance(double oRadiance[3], double iSaturation) const = 0 Gets the filtered RGB radiance of the star.
This method applies an atmospheric attenuation threshold corresponding to the typical energy budget of the Earth (29% reflected back to space, 23% absorbed by the atmosphere) to the amount of the incoming light from the star plus a custom saturation term specifed by iSaturation.
Parameters: - oRadiance – The returned RGB radiance of the star, including the influence of the atmosphere.
 - iSaturation – Saturation term in [ 0.0, 1.0 ].
 
-