SketchUp C API
|
References an environment, which enables sky boxes and image-based lighting. More...
#include <SketchUpAPI/model/environment.h>
Related Functions | |
(Note that these are not member functions.) | |
SUEntityRef | SUEnvironmentToEntity (SUEnvironmentRef environment) |
Converts from an SUEnvironmentRef to an SUEntityRef. This is essentially an upcast operation. More... | |
SUEnvironmentRef | SUEnvironmentFromEntity (SUEntityRef entity) |
Converts from an SUEntityRef to an SUEnvironmentRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUEnvironmentRef. More... | |
enum SUResult | SUEnvironmentCreateFromFile (SUEnvironmentRef *environment, const char *file_path, const char *name) |
Creates an environment object from an SKE, HDR, or EXR file. The image will be loaded into the environment's skydome as a cubemap. More... | |
enum SUResult | SUEnvironmentWriteToFile (SUEnvironmentRef environment, const char *file_path) |
Writes an environment to an SKE file. More... | |
enum SUResult | SUEnvironmentRelease (SUEnvironmentRef *environment) |
Releases an environment object and its associated objects. More... | |
enum SUResult | SUEnvironmentSetName (SUEnvironmentRef environment, const char *name) |
Sets the name of a environment object. More... | |
enum SUResult | SUEnvironmentGetName (SUEnvironmentRef environment, SUStringRef *name) |
Retrieves the name of a environment object. More... | |
enum SUResult | SUEnvironmentSetDescription (SUEnvironmentRef environment, const char *desc) |
Sets the description of a environment object. More... | |
enum SUResult | SUEnvironmentGetDescription (SUEnvironmentRef environment, SUStringRef *desc) |
Retrieves the description of a environment object. More... | |
enum SUResult | SUEnvironmentSetUseAsSkydome (SUEnvironmentRef environment, bool skydome) |
Sets the the environment to be used as a skydome. More... | |
enum SUResult | SUEnvironmentGetUseAsSkydome (SUEnvironmentRef environment, bool *skydome) |
Retrieves whether the environment is used as a skydome. More... | |
enum SUResult | SUEnvironmentSetUseForReflections (SUEnvironmentRef environment, bool reflections) |
Sets the the environment to be used for reflections. More... | |
enum SUResult | SUEnvironmentGetUseForReflections (SUEnvironmentRef environment, bool *reflections) |
Retrieves whether the environment is used for reflections. More... | |
enum SUResult | SUEnvironmentSetRotation (SUEnvironmentRef environment, double angle) |
Sets the the environment image vertical rotation angle in degrees. More... | |
enum SUResult | SUEnvironmentGetRotation (SUEnvironmentRef environment, double *angle) |
Retrieves the environment image rotation in degrees. More... | |
enum SUResult | SUEnvironmentSetSkydomeExposure (SUEnvironmentRef environment, double exposure) |
Sets the skydome exposure to compensate for variations in HDR image exposure. The unaltered exposure level is 1.0 . More... | |
enum SUResult | SUEnvironmentGetSkydomeExposure (SUEnvironmentRef environment, double *exposure) |
Retrieves the skydome exposure of the environment. More... | |
enum SUResult | SUEnvironmentSetReflectionExposure (SUEnvironmentRef environment, double exposure) |
Sets the reflection exposure of the environment. More... | |
enum SUResult | SUEnvironmentGetReflectionExposure (SUEnvironmentRef environment, double *exposure) |
Retrieves the reflection exposure of the environment. More... | |
enum SUResult | SUEnvironmentSetLinkedSun (SUEnvironmentRef environment, bool linked_sun) |
Sets the linked sun flag of the environment, enabling the shadow-casting light. Corresponding to "Set Sun Location" in the SketchUp UI. More... | |
enum SUResult | SUEnvironmentGetLinkedSun (SUEnvironmentRef environment, bool *linked_sun) |
Retrieves whether the environment is linked sun is enabled. More... | |
enum SUResult | SUEnvironmentSetLinkedSunPosition (SUEnvironmentRef environment, const struct SUPoint2D *position) |
Sets the linked sun position in the environment. More... | |
enum SUResult | SUEnvironmentGetLinkedSunPosition (SUEnvironmentRef environment, struct SUPoint2D *position) |
Retrieves the linked sun position in the environment. More... | |
enum SUResult | SUEnvironmentGetThumbnail (SUEnvironmentRef environment, SUImageRepRef *image) |
Retrieves the thumbnail preview image for the given environment. More... | |
enum SUResult | SUEnvironmentWriteHDRImageToFile (SUEnvironmentRef environment, const char *dir_path, SUStringRef *full_path_written) |
Writes the HDR image of the environment to a file in its original file type. More... | |
References an environment, which enables sky boxes and image-based lighting.
|
related |
Creates an environment object from an SKE, HDR, or EXR file. The image will be loaded into the environment's skydome as a cubemap.
[out] | environment | The created environment object. |
[in] | file_path | The path to the SKE, HDR, or EXR file. |
[in] | name | The name of the environment. |
environment
already references a valid objectfile_path
, name
, or environment
is NULL
file_path
or name
is an empty stringenvironment
could not be created from the file at file_path
|
related |
Converts from an SUEntityRef to an SUEnvironmentRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUEnvironmentRef.
[in] | entity | The given entity reference. |
|
related |
Retrieves the description of a environment object.
[in] | environment | The environment object. |
[out] | desc | The description retrieved. |
environment
is not a valid objectdesc
is NULL
desc
does not point to a valid SUStringRef object
|
related |
Retrieves whether the environment is linked sun is enabled.
[in] | environment | The environment object. |
[out] | linked_sun | The flag retrieved. |
environment
is not a valid objectlinked_sun
is NULL
|
related |
Retrieves the linked sun position in the environment.
[in] | environment | The environment object. |
[out] | position | The position retrieved. |
environment
is not a valid objectposition
is NULL
|
related |
Retrieves the name of a environment object.
[in] | environment | The environment object. |
[out] | name | The name retrieved. |
environment
is not a valid objectname
is NULL
name
does not point to a valid SUStringRef object
|
related |
Retrieves the reflection exposure of the environment.
[in] | environment | The environment object. |
[out] | exposure | The exposure retrieved. |
environment
is not a valid objectexposure
is NULL
|
related |
Retrieves the environment image rotation in degrees.
[in] | environment | The environment object. |
[out] | angle | The angle retrieved. |
environment
is not a valid objectangle
is NULL
|
related |
Retrieves the skydome exposure of the environment.
[in] | environment | The environment object. |
[out] | exposure | The exposure retrieved. |
environment
is not a valid objectexposure
is NULL
|
related |
Retrieves the thumbnail preview image for the given environment.
[in] | environment | The environment object. |
[out] | image | The thumbnail to be retrieved. |
environment
is not a valid objectimage
is NULLimage
does not point to a valid SUImageRepRef object
|
related |
Retrieves whether the environment is used as a skydome.
[in] | environment | The environment object. |
[out] | skydome | The flag retrieved. |
environment
is not a valid objectNULL
|
related |
Retrieves whether the environment is used for reflections.
[in] | environment | The environment object. |
[out] | reflections | The flag retrieved. |
environment
is not a valid objectreflections
is NULL
|
related |
Releases an environment object and its associated objects.
SUEnvironmentsRef
methods should not be released as it is owned by the model. [in,out] | environment | The environment object. |
environment
is NULL
environment
does not reference a valid object
|
related |
Sets the description of a environment object.
[in] | environment | The environment object. |
[in] | desc | The description to be set. Assumed to be UTF-8 encoded. |
environment
is not a valid objectdesc
is NULL
|
related |
Sets the linked sun flag of the environment, enabling the shadow-casting light. Corresponding to "Set Sun Location" in the SketchUp UI.
[in] | environment | The environment object. |
[in] | linked_sun | The flag to set the environment object. |
environment
is not a valid object
|
related |
Sets the linked sun position in the environment.
[in] | environment | The environment object. |
[in] | position | The position to set the environment object. x corresponds to longitude with the range [0.0, 1.0] , y corresponds to latitude with the range [-1.0, 1.0] . |
environment
is not a valid objectposition
is NULL
position
has invalid x or y values
|
related |
Sets the name of a environment object.
[in] | environment | The environment object. |
[in] | name | The name string to set the environment object. Assumed to be UTF-8 encoded. |
environment
is not a valid objectname
is NULL
name
is an empty string or if no manager is associated with the environmentname
is a duplicate of another environment
|
related |
Sets the reflection exposure of the environment.
[in] | environment | The environment object. |
[in] | exposure | The exposure to set the environment object, within the range [0.0, 10.0]. |
environment
is not a valid objectexposure
is not within the range [0.0, 10.0]
|
related |
Sets the the environment image vertical rotation angle in degrees.
[in] | environment | The environment object. |
[in] | angle | The angle to set the environment object, within the range [0.0, 360.0) |
environment
is not a valid objectangle
is not within the range [0.0, 360.0)
|
related |
Sets the skydome exposure to compensate for variations in HDR image exposure. The unaltered exposure level is 1.0
.
[in] | environment | The environment object. |
[in] | exposure | The exposure to set the environment object, within the range [0.0, 20.0]. |
environment
is not a valid objectexposure
is not within the range [0.0, 20.0]
|
related |
Sets the the environment to be used as a skydome.
[in] | environment | The environment object. |
[in] | skydome | The flag to set on the environment object. |
environment
is not a valid object
|
related |
Sets the the environment to be used for reflections.
[in] | environment | The environment object. |
[in] | reflections | The flag to set the environment object. |
environment
is not a valid object
|
related |
Converts from an SUEnvironmentRef to an SUEntityRef. This is essentially an upcast operation.
[in] | environment | The given environment reference. |
environment
is a valid object
|
related |
Writes the HDR image of the environment to a file in its original file type.
[in] | environment | The environment object. |
[in] | dir_path | The directory path to save the HDR image to. |
[out] | full_path_written | The full path of the written file. |
environment
is not a valid objectdir_path
or full_path_written
is NULL
dir_path
is an empty stringdir_path
|
related |
Writes an environment to an SKE file.
[in] | environment | The environment object to write to file. |
[in] | file_path | The location to save the environment to. Assumed to be UTF-8 encoded. |
environment
is not a valid objectfile_path
, name
, or environment
is NULL
file_path
or name
is an empty stringenvironment
could not be written to file_path