class ART::IGeometry

Geometry interface for mesh manipulation.

#include <ARTIGeometry.h>

Inherits: IREDObject.

Public functions:

virtual RED_RCAddReflectionProbe ( RED::Object * iReflectionProbe ) = 0
virtual RED_RCDestroyReflectionProbe ( int iIndex ) = 0
virtual doubleGetGICachesMultiplier ( ) const = 0
virtual intGetGISamplesCount ( ) const = 0
virtual RED::Object *GetLight ( int iIndex ) const = 0
virtual intGetLightsCount ( ) const = 0
virtual RED::Object *GetMaterial ( int iIndex ) const = 0
virtual intGetMaterialsCount ( ) const = 0
virtual RED::uint64GetMemoryUsage ( ART::MEMORY iMemory ) const = 0
virtual RED::Object *GetPlanet ( ) const = 0
virtual doubleGetPrivateShadowBias ( ) const = 0
virtual intGetPrivateShadowMapSize ( ) const = 0
virtual RED::Object *GetReflectionProbe ( int iIndex ) const = 0
virtual intGetReflectionProbesCount ( ) const = 0
virtual const RED::Matrix &GetRootMatrix ( ) const = 0
virtual const RED::Map< int, bool > &GetSelectedSubMeshes ( ) const = 0
virtual doubleGetTextureDefinition ( ) const = 0
virtual doubleGetTextureLodBias ( ) const = 0
virtual RED_RCGetVerticesCount ( int & oVerticesCountOpaque, int & oVerticesCountTranspar, int & oVerticesCountMasked, int & oVerticesCountEmissive ) const = 0
virtual boolHasPrivateShadowMap ( ) const = 0
virtual RED_RCInsertReflectionProbe ( RED::Object * iReflectionProbe, int iIndex ) = 0
virtual boolIsAutomaticSetOnGround ( ) const = 0
virtual boolIsSelected ( ) const = 0
virtual boolIsSelectedLight ( int iIndex ) const = 0
virtual boolIsSelectedSubMesh ( int iID ) const = 0
virtual voidSetAutomaticSetOnGround ( bool iAuto ) = 0
virtual RED_RCSetGICaches ( const RED::Vector< RED::Vector< RED::Object * > > & iGICaches, const RED::Vector< RED::Vector< RED::Object * > > & iGICachesBakedLights, const RED::Vector< RED::Object * > & iAOCaches, float iLandscapeAO ) = 0
virtual RED_RCSetGICachesMultiplier ( double iMult ) = 0
virtual RED_RCSetGroundAOCache ( const RED::Vector< unsigned char > & iGroundAO, const double iGroundBC[3] ) = 0
virtual RED_RCSetGroundElevation ( const RED::Vector< float > & iGroundElevation, const RED::Vector< float > & iGroundElevationWeight, const RED::Vector< float > iGroundDensity[4], const double iGroundElevationBC[3], int iGroundElevationMapSize ) = 0
virtual voidSetPrivateShadowBias ( double iBias ) = 0
virtual voidSetPrivateShadowMap ( bool iPrivate ) = 0
virtual voidSetPrivateShadowMapSize ( int iSize ) = 0
virtual RED_RCSetRootMatrix ( const RED::Matrix & iMatrix ) = 0
virtual voidSetSelected ( bool iSelect ) = 0
virtual RED_RCSetSelectedLight ( int iIndex, bool iSelect ) = 0
virtual RED_RCSetSelectedSubMesh ( int iID, bool iSelect ) = 0
virtual voidSetTextureDefinition ( double iTextureDefinition ) = 0
virtual voidSetTextureLodBias ( double iTextureLodBias ) = 0
virtual RED_RCSetVertexAO ( const RED::Vector< float > & iAOValues, int iAOSizeOpaque, int iAOSizeTranspar, int iAOSizeMasked, float iLandscapeAO = 1.f ) = 0
virtual RED_RCSetVertexGI ( const RED::Color & iGIColor ) = 0

Public static functions:

static RED::CIDGetClassID ( )

Functions documentation

public virtual RED_RC ART::IGeometry::AddReflectionProbe(RED::Object *iReflectionProbe) = 0

Adds a reflection probe to the geometry.

Parameters:

iReflectionProbe:The ART::ReflectionProbe object to add to the geometry.

Returns:

RED_OK if the method has succeeded,
RED_BAD_PARAM if iReflectionProbe is not a valid ART::ReflectionProbe object,
RED_FAIL otherwise.

Removes and deletes the reflection probe at the given index from the geometry.

Parameters:

iIndex:Position where to remove the reflection probe.

Returns:

RED_OK if the method has succeeded,
RED_BAD_PARAM if iIndex is not a valid index,
RED_FAIL otherwise.
public virtual double ART::IGeometry::GetGICachesMultiplier() const = 0

Returns:

The GI caches intensity multiplier value.
public virtual int ART::IGeometry::GetGISamplesCount() const = 0

Gets the number of samples stored in the GI cache of the geometry (does not consider light caches).

Returns:

the number of GI cache samples.
public virtual RED::Object * ART::IGeometry::GetLight(intiIndex) const = 0

Gets the light by its index.

Parameters:

iIndex:the index of the light.

Returns:

the light as ART::ILight.
public virtual int ART::IGeometry::GetLightsCount() const = 0

Gets the number of lights associated to the geometry.

Returns:

the number of lights.
public virtual RED::Object * ART::IGeometry::GetMaterial(intiIndex) const = 0

Gets a material by its index.

Parameters:

iIndex:Index of the material to retrieve.

Returns:

the material at the iIndex position as a ART::IMaterial.
public virtual int ART::IGeometry::GetMaterialsCount() const = 0

Gets the number of materials in the geometry.

Returns:

the number of materials.
public virtual RED::uint64 ART::IGeometry::GetMemoryUsage(ART::MEMORYiMemory) const = 0

Gets the amount of memory used by the geometry.

Parameters:

iMemory:type of memory: CPU or GPU.

Returns:

the amount of memory used in bytes.
public virtual RED::Object * ART::IGeometry::GetPlanet() const = 0

Gets the planet holding the geometry.

Returns:

the planet as a ART::IPlanet, NULL if it has none.
public virtual double ART::IGeometry::GetPrivateShadowBias() const = 0

Gets the private shadow bias.

Returns:

the private shadow bias.
public virtual int ART::IGeometry::GetPrivateShadowMapSize() const = 0

Gets the private shadow map size.

Returns:

the private shadow map size in pixel.
public virtual RED::Object * ART::IGeometry::GetReflectionProbe(intiIndex) const = 0

Gets a reflection probe by its index.

Parameters:

iIndex:Index of the reflection probe to retrieve.

Returns:

the reflection probe as a ART::IReflectionProbe.

Gets the number of reflection probes in the geometry.

Returns:

the number of reflection probes.
public virtual const RED::Matrix & ART::IGeometry::GetRootMatrix() const = 0

Returns:

The root matrix of the geometry.
public virtual const RED::Map< int, bool > & ART::IGeometry::GetSelectedSubMeshes() const = 0

Gets a list of all the selected sub-meshes.

The return map is the list of sub-mesh ids associated to a boolean set to true if the sub-mesh is selected and false otherwise.

Returns:

The list of selected sub-meshes.
public virtual double ART::IGeometry::GetTextureDefinition() const = 0

Gets the atlas texture definition in pixel per meter.

This value is used to control the mipmap change threshold.

Returns:

the texture definition (pix/m).
public virtual double ART::IGeometry::GetTextureLodBias() const = 0

Gets the texture lod bias value.

Returns:

the texture lod bias value.
public virtual RED_RC ART::IGeometry::GetVerticesCount(int &oVerticesCountOpaque,
int &oVerticesCountTranspar,
int &oVerticesCountMasked,
int &oVerticesCountEmissive
)const = 0

Gets the number of vertices of the meshes.

Parameters:

oVerticesCountOpaque:the number of vertices of the opaque meshes.
oVerticesCountTranspar:the number of vertices of the transparent meshes.
oVerticesCountMasked:the number of vertices of the masked meshes.
oVerticesCountEmissive:the number of vertices of the emissive meshes.

Returns:

RED_OK if the method has succeeded,
RED_FAIL otherwise.
public virtual bool ART::IGeometry::HasPrivateShadowMap() const = 0

Tests whether the geometry uses a private shadow map or not.

Returns:

true if the geometry uses a private shadow map. False otherwise.
public virtual RED_RC ART::IGeometry::InsertReflectionProbe(RED::Object *iReflectionProbe,
intiIndex
) = 0

Adds a reflection probe to the geometry at a given index.

Parameters:

iReflectionProbe:The ART::ReflectionProbe object to add to the geometry.
iIndex:Position where to insert the reflection probe.

Returns:

RED_OK if the method has succeeded,
RED_BAD_PARAM if iReflectionProbe is not a valid ART::ReflectionProbe object,
RED_FAIL otherwise.
public virtual bool ART::IGeometry::IsAutomaticSetOnGround() const = 0

Returns:

true if the geometry has an automatic on ground placement.
public virtual bool ART::IGeometry::IsSelected() const = 0

Gets the geometry selection feedback flag.

Returns:

true if the geometry is selected, false otherwise.
public virtual bool ART::IGeometry::IsSelectedLight(intiIndex) const = 0

Tests if the light at the given index is selected.

Parameters:

iIndex:The index of the light to query.

Returns:

true if the iIndex-th light of the geometry is selected, false otherwise.
public virtual bool ART::IGeometry::IsSelectedSubMesh(intiID) const = 0

Tests if sub-meshes with a given material ID are selected.

Parameters:

iID:The ID to query.

Returns:

true if sub-meshes whose ID is iID are selected, false otherwise.
public virtual void ART::IGeometry::SetAutomaticSetOnGround(booliAuto) = 0

Defines if the geometry should be placed on the planet ground or not.

This method works with the ART::IPlanet::AddGeometry call. On adding a geometry, if iAuto is true, the geometry is automatically set on the landscape ground. If iAuto is false, the geometry remains at the specified input position. By default, a geometry is automatically set on ground.

Parameters:

iAuto:true to automatically set the geometry on the ground when it gets added to a planet.
public virtual RED_RC ART::IGeometry::SetGICaches(const RED::Vector< RED::Vector< RED::Object * > > &iGICaches,
const RED::Vector< RED::Vector< RED::Object * > > &iGICachesBakedLights,
const RED::Vector< RED::Object * > &iAOCaches,
floatiLandscapeAO
) = 0

Sets the GI cache data.

If the geometry is a reference geometry, GI caches received are stored by it and will be deleted by it. These caches must have been generated or loaded by the ART::IAssetManager. A set of caches retrieved from the resource manager can be set once into a geometry reference, otherwise redundant destructions will occur. If the geometry is an instance geometry, GI caches are only pointed to.

Parameters:

iGICaches:List of GI caches for each sun position of the geodesic sphere.
iGICachesBakedLights:List of GI caches for each baked light.
iAOCaches:List of ambient occlusion caches.
iLandscapeAO;The value of the AO field surrounding the geometry.

Returns:

RED_OK if the method has succeeded,
RED_FAIL otherwise.
public virtual RED_RC ART::IGeometry::SetGICachesMultiplier(doubleiMult) = 0

Apply an intensity multiplier to the geometry GI caches.

The value of iMultiplier is applied to the GI cache of the geometry in order to strengthen or to weaken the GI of that geometry in the context of a given scene, relatively to other elements displayed.

Parameters:

iMult:Intensity multiplier applied to GI caches. Must be positive or zero.

Returns:

RED_OK if the method has succeeded,
RED_BAD_PARAM if iGICacheMult was negative.
public virtual RED_RC ART::IGeometry::SetGroundAOCache(const RED::Vector< unsigned char > &iGroundAO,
const doubleiGroundBC[3]
) = 0

Sets the geometry ambient occlusion cache for the ground.

Parameters:

iGroundAO:the AO cache as an array of size ART_GEOMETRY_AO_GROUND_FIELD_RESOLUTION.
iGroundBC:the ground bounding circle (center position x and y, radius).

Returns:

RED_OK if the method has succeeded,
RED_FAIL otherwise.
public virtual RED_RC ART::IGeometry::SetGroundElevation(const RED::Vector< float > &iGroundElevation,
const RED::Vector< float > &iGroundElevationWeight,
const RED::Vector< float >iGroundDensity[4],
const doubleiGroundElevationBC[3],
intiGroundElevationMapSize
) = 0

Sets the ground elevation data.

Parameters:

iGroundElevation:ground elevation cache.
iGroundElevationWeight:ground elevation weight cache.
iGroundDensity:ground density caches for each type of prism.
iGroundElevationBC:bounding circle of the ground elevation (center position x and y, radius).
iGroundElevationMapSize:size of the square elevation and densities arrays.

Returns:

RED_OK if the method has succeeded,
RED_FAIL otherwise.
public virtual void ART::IGeometry::SetPrivateShadowBias(doubleiBias) = 0

Sets the private shadow bias used in shading.

Parameters:

iBias:bias to set to the private shadow.
public virtual void ART::IGeometry::SetPrivateShadowMap(booliPrivate) = 0

Sets a private shadow map for this geometry.

The private shadow map replaces the global CSM for this geometry.

Parameters:

iPrivate:true to use a private shadow map.
public virtual void ART::IGeometry::SetPrivateShadowMapSize(intiSize) = 0

Sets the private shadow map size.

Parameters:

iSize:size to set to the private shadow map.
public virtual RED_RC ART::IGeometry::SetRootMatrix(const RED::Matrix &iMatrix) = 0

Sets the root shape matrix of the geometry.

Parameters:

iMatrix:the new root shape matrix.

Returns:

RED_OK if the method has succeeded,
RED_FAIL otherwise.
public virtual void ART::IGeometry::SetSelected(booliSelect) = 0

Sets the geometry selection feedback flag.

The geometry selection feedback flag can be directly set to highlight or unhighlight the geometry.

Parameters:

iSelect:Set to true to have the geometry selected and highlighted, set to false to unselect it.
public virtual RED_RC ART::IGeometry::SetSelectedLight(intiIndex,
booliSelect
) = 0

Selects a light by its number.

Parameters:

iIndex:The index of the light to select.
iSelect:Set to true to that light selected, set to false to unselect it.

Returns:

RED_OK if the operation has succeeded,
RED_ALLOC_FAILURE if a memory allocation has failed,
RED_FAIL otherwise.
public virtual RED_RC ART::IGeometry::SetSelectedSubMesh(intiID,
booliSelect
) = 0

Selects sub-meshes by the material IDs they own.

Parameters:

iID:The ID to select.
iSelect:Set to true to have all sub-meshes using iID selected and highlighted, set to false to unselect them.

Returns:

RED_OK if the operation has succeeded,
RED_ALLOC_FAILURE if a memory allocation has failed,
RED_FAIL otherwise.
public virtual void ART::IGeometry::SetTextureDefinition(doubleiTextureDefinition) = 0

Sets the texture texel definition in pixel per meter.

Parameters:

iTextureDefinition:texture definition value.
public virtual void ART::IGeometry::SetTextureLodBias(doubleiTextureLodBias) = 0

Sets the texture lod bias value.

Parameters:

iTextureLodBias:texture lod bias value.
public virtual RED_RC ART::IGeometry::SetVertexAO(const RED::Vector< float > &iAOValues,
intiAOSizeOpaque,
intiAOSizeTranspar,
intiAOSizeMasked,
floatiLandscapeAO = 1.f
) = 0

Sets the vertex AO values.

This function must be called in place of ART::IGeometry::SetGICache to get a cheaper ambient occlusion.

The array of values must contains all the AO values for the opaque mesh vertices followed by all the AO values for the transparent mesh vertices. Its size is iAOSizeOpaque + iAOSizeTranspar.

Parameters:

iAOValues:Ambient occlusion values for each vertices of the geometry.
iAOSizeOpaque:Number of values for the opaque mesh.
iAOSizeTranspar:Number of values for the transparent mesh.
iAOSizeMasked:Number of values for the masked mesh.
iLandscapeAO:Landscape AO value influencing the overall AO.

Returns:

RED_OK if the method has succeeded,
RED_FAIL otherwise.
public virtual RED_RC ART::IGeometry::SetVertexGI(const RED::Color &iGIColor) = 0

Sets the vertex GI color.

This function must be called in place of ART::IGeometry::SetGICache to get a cheaper global illumination.

Parameters:

iGIColor:GI color to set to the vertices.

Returns:

RED_OK if the method has succeeded,
RED_FAIL otherwise.