Simplygon C++ API  8.3.35800.0
SimplygonSDK::IFoliageSettings Class Referenceabstract

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::IFoliageSettings:
SimplygonSDK::ISettingsObject SimplygonSDK::IObject

Public Member Functions

virtual bool GetBillboardAllowConvexPolygons ()=0
 
virtual float GetBillboardDensity ()=0
 
virtual bool GetBillboardFavorVerticalPlanes ()=0
 
virtual unsigned int GetBillboardMaxPlaneCount ()=0
 
virtual bool GetBillboardSubdividePlanes ()=0
 
virtual float GetBillboardTrunkReductionRatio ()=0
 
virtual bool GetBillboardTwoSided ()=0
 
virtual bool GetBillboardUseVisibilityWeights ()=0
 
virtual const char * GetClass ()
 
virtual unsigned int GetFlipbookNumberOfViews ()=0
 
virtual float GetFlipbookVerticalAngleInRadians ()=0
 
virtual unsigned int GetFoliageType ()=0
 
virtual real GetSeparateFoliageAreaThreshold ()=0
 
virtual real GetSeparateFoliageSizeThreshold ()=0
 
virtual float GetSeparateFoliageTriangleRatio ()=0
 
virtual unsigned int GetSeparateFoliageTriangleThreshold ()=0
 
virtual bool IsA (const char *type) const
 
virtual void SetBillboardAllowConvexPolygons (bool value)=0
 
virtual void SetBillboardDensity (float value)=0
 
virtual void SetBillboardFavorVerticalPlanes (bool value)=0
 
virtual void SetBillboardMaxPlaneCount (unsigned int value)=0
 
virtual void SetBillboardSubdividePlanes (bool value)=0
 
virtual void SetBillboardTrunkReductionRatio (float value)=0
 
virtual void SetBillboardTwoSided (bool value)=0
 
virtual void SetBillboardUseVisibilityWeights (bool value)=0
 
virtual void SetFlipbookNumberOfViews (unsigned int value)=0
 
virtual void SetFlipbookVerticalAngleInRadians (float value)=0
 
virtual void SetFoliageType (unsigned int value)=0
 
virtual void SetSeparateFoliageAreaThreshold (real value)=0
 
virtual void SetSeparateFoliageSizeThreshold (real value)=0
 
virtual void SetSeparateFoliageTriangleRatio (float value)=0
 
virtual void SetSeparateFoliageTriangleThreshold (unsigned int value)=0
 
- Public Member Functions inherited from SimplygonSDK::ISettingsObject
virtual rstring GetErrorString ()=0
 
virtual bool ValidateSettings ()=0
 
- Public Member Functions inherited from SimplygonSDK::IObject
virtual rid AddObserver (robserver *Observer, rid EventId)=0
 
virtual void AddRef ()=0
 
virtual rstring GetName ()=0
 
virtual void * GetUserComponentArea (rid userid)=0
 
virtual void PrintInfo ()=0
 
virtual void Release ()=0
 
virtual void RemoveObserver (rid ObserverId)=0
 
virtual void SetName (const char *Name)=0
 

Static Public Member Functions

static bool IsClassA (const char *type)
 
static IFoliageSettingsSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::ISettingsObject
static bool IsClassA (const char *type)
 
static ISettingsObjectSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

Settings for the ImpostorProccessor

Definition at line 20113 of file SimplygonSDK.h.

Member Function Documentation

◆ GetBillboardAllowConvexPolygons()

virtual bool SimplygonSDK::IFoliageSettings::GetBillboardAllowConvexPolygons ( )
pure virtual

Determines if billboards are limited to being planes or allowed to be more complex polygons that follow the shape of the projected geometry.

Returns
the current value

◆ GetBillboardDensity()

virtual float SimplygonSDK::IFoliageSettings::GetBillboardDensity ( )
pure virtual

Determines how many billboards to create. A large BillboardDensity means that more billboards will be created to represent spatially spread out triangles better. Having a low BillboardDensity means that fewer billboards will be created and the distances from original leaves to billboards will get larger. The range is 0->1.

Returns
the current value

◆ GetBillboardFavorVerticalPlanes()

virtual bool SimplygonSDK::IFoliageSettings::GetBillboardFavorVerticalPlanes ( )
pure virtual

Determines whether to prioritize generating vertical billboards which means they will be optimized to be viewed from the side. Otherwise, if the foliage in the input scene is mostly facing upwards/downwards then the generated billboards will also be facing upwards/downwards which makes them not well suited to being viewed from the side.

Returns
the current value

◆ GetBillboardMaxPlaneCount()

virtual unsigned int SimplygonSDK::IFoliageSettings::GetBillboardMaxPlaneCount ( )
pure virtual

Determines the maximum billboard count. When this criteria is met, it is not guaranteed that all triangles in the scene have been accurately mapped to a billboard yet. Triangles that have nor been mapped to a billboard within the BillboardMaxDeviation distance will be mapped to an existing billboard that best represents the triangle.

Returns
the current value

◆ GetBillboardSubdividePlanes()

virtual bool SimplygonSDK::IFoliageSettings::GetBillboardSubdividePlanes ( )
pure virtual

If a billboard has multiple disjointed groups of foliage projected onto it with spaces between, BillboardSubdividePlanes can be used to split the billboard into multiple billboards that better encapsulates the projected foliage groups. Subdividing the billboards will increase triangle count for the billboards, but increase useful texture usage (less wasted space) and decrease rendering overdraw.

Returns
the current value

◆ GetBillboardTrunkReductionRatio()

virtual float SimplygonSDK::IFoliageSettings::GetBillboardTrunkReductionRatio ( )
pure virtual

Determines the triangle reduction ratio for the trunk part that has been separated from the foliage part based on the "separate foliage" settings.

Returns
the current value

◆ GetBillboardTwoSided()

virtual bool SimplygonSDK::IFoliageSettings::GetBillboardTwoSided ( )
pure virtual

Determines if the foliage is intended to be viewed from both sides without back face culling.

Returns
the current value

◆ GetBillboardUseVisibilityWeights()

virtual bool SimplygonSDK::IFoliageSettings::GetBillboardUseVisibilityWeights ( )
pure virtual

Determines whether to prioritize accurately mapping triangles with higher visibility to billboards.

Returns
the current value

◆ GetClass()

virtual const char* SimplygonSDK::IFoliageSettings::GetClass ( )
virtual

GetClass returns the name of the class of the object.

Returns
the name of the actual class of the object, as a const char string

Reimplemented from SimplygonSDK::ISettingsObject.

◆ GetFlipbookNumberOfViews()

virtual unsigned int SimplygonSDK::IFoliageSettings::GetFlipbookNumberOfViews ( )
pure virtual

Determines the number of views generated for the flip book impostor.

Returns
the current value

◆ GetFlipbookVerticalAngleInRadians()

virtual float SimplygonSDK::IFoliageSettings::GetFlipbookVerticalAngleInRadians ( )
pure virtual

Determines the vertical angle of the views to generate for the flip book impostor. 0 radians: Looking horizontally at the scene. pi/2 radians: Looking at the scene from above. -pi/2 radians: Looking at the scene from below.

Returns
the current value

◆ GetFoliageType()

virtual unsigned int SimplygonSDK::IFoliageSettings::GetFoliageType ( )
pure virtual

Determines which type of Foliage impostor to generate. SG_FOLIAGETYPE_BILLBOARDS generates a static mesh with billboards. SG_FOLIAGETYPE_FLIPBOOK generates a mapping image representing a number of views around the scene.

Returns
the current SG_FOLIAGETYPE_[...] value

◆ GetSeparateFoliageAreaThreshold()

virtual real SimplygonSDK::IFoliageSettings::GetSeparateFoliageAreaThreshold ( )
pure virtual

Is used to separate the trunk from the foliage in a vegetation scene by finding each group of connected triangles in the scene and if the surface area is below (SeparateFoliageAreaThreshold * AreaOfTheLargestGroupInTheScene) it is treated as foliage and processed into billboards. The trunk is optimized using reduction. The range is 0->large value. 0 means nothing will be foliage, value larger than the maximum surface area means everything will be foliage.

Returns
the current value

◆ GetSeparateFoliageSizeThreshold()

virtual real SimplygonSDK::IFoliageSettings::GetSeparateFoliageSizeThreshold ( )
pure virtual

Is used to separate the trunk from the foliage in a vegetation scene by finding each group of connected triangles in the scene and if the diameter of the group is below (SeparateFoliageSizeThreshold * SceneDiameter) it is treated as foliage and processed into billboards. The trunk is optimized using reduction. The range is 0->large value. 0 means nothing will be foliage, value larger than the scene's diameter means everything will be foliage.

Returns
the current value

◆ GetSeparateFoliageTriangleRatio()

virtual float SimplygonSDK::IFoliageSettings::GetSeparateFoliageTriangleRatio ( )
pure virtual

Is used to separate the trunk from the foliage in a vegetation scene by comparing each group of connected triangles in the scene with the scene's largest group. If a group's triangle count is below SeparateFoliageTriangleRatio * largestGrouptriangleCount it is treated as foliage and processed into billboards. The trunk is optimized using triangle reduction. The range is 0.0->1.0. 0.0 means nothing will be foliage, 1.0 means everything will be foliage.

Returns
the current value

◆ GetSeparateFoliageTriangleThreshold()

virtual unsigned int SimplygonSDK::IFoliageSettings::GetSeparateFoliageTriangleThreshold ( )
pure virtual

Is used to separate the trunk from the foliage in a vegetation scene by finding each group of connected triangles in the scene and if the triangle count is below SeparateFoliageTriangleThreshold it is treated as foliage and processed into billboards. The trunk is optimized using reduction. The range is 0->large value. 0 means nothing will be foliage, value larger than the maximum triangle count means everything will be foliage.

Returns
the current value

◆ IsA()

virtual bool SimplygonSDK::IFoliageSettings::IsA ( const char *  type) const
virtual

The IsA function returns true if the object is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the object is, or is a descendant of
Returns
true if the object is of the specified class, false if not

Reimplemented from SimplygonSDK::ISettingsObject.

◆ IsClassA()

static bool SimplygonSDK::IFoliageSettings::IsClassA ( const char *  type)
inlinestatic

The IsClassA function returns true if IFoliageSettings is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the class is, or is a descendant of
Returns
true if the class is of the specified class, false if not

Definition at line 20134 of file SimplygonSDK.h.

◆ SafeCast()

static IFoliageSettings* SimplygonSDK::IFoliageSettings::SafeCast ( IObject ptr)
inlinestatic

SafeCast makes sure the pointer is of a class that can be cast into a IFoliageSettings pointer, and if this is possible, returns the cast pointer.

Parameters
ptris the pointer to be cast into a IFoliageSettings pointer
Returns
a pointer to the IFoliageSettings object, if the cast can be made, and a NULL pointer otherwise

Definition at line 20147 of file SimplygonSDK.h.

◆ SetBillboardAllowConvexPolygons()

virtual void SimplygonSDK::IFoliageSettings::SetBillboardAllowConvexPolygons ( bool  value)
pure virtual

Determines if billboards are limited to being planes or allowed to be more complex polygons that follow the shape of the projected geometry.

Parameters
valuethe new value

◆ SetBillboardDensity()

virtual void SimplygonSDK::IFoliageSettings::SetBillboardDensity ( float  value)
pure virtual

Determines how many billboards to create. A large BillboardDensity means that more billboards will be created to represent spatially spread out triangles better. Having a low BillboardDensity means that fewer billboards will be created and the distances from original leaves to billboards will get larger. The range is 0->1.

Parameters
valuethe new value

◆ SetBillboardFavorVerticalPlanes()

virtual void SimplygonSDK::IFoliageSettings::SetBillboardFavorVerticalPlanes ( bool  value)
pure virtual

Determines whether to prioritize generating vertical billboards which means they will be optimized to be viewed from the side. Otherwise, if the foliage in the input scene is mostly facing upwards/downwards then the generated billboards will also be facing upwards/downwards which makes them not well suited to being viewed from the side.

Parameters
valuethe new value

◆ SetBillboardMaxPlaneCount()

virtual void SimplygonSDK::IFoliageSettings::SetBillboardMaxPlaneCount ( unsigned int  value)
pure virtual

Determines the maximum billboard count. When this criteria is met, it is not guaranteed that all triangles in the scene have been accurately mapped to a billboard yet. Triangles that have nor been mapped to a billboard within the BillboardMaxDeviation distance will be mapped to an existing billboard that best represents the triangle.

Parameters
valuethe new value

◆ SetBillboardSubdividePlanes()

virtual void SimplygonSDK::IFoliageSettings::SetBillboardSubdividePlanes ( bool  value)
pure virtual

If a billboard has multiple disjointed groups of foliage projected onto it with spaces between, BillboardSubdividePlanes can be used to split the billboard into multiple billboards that better encapsulates the projected foliage groups. Subdividing the billboards will increase triangle count for the billboards, but increase useful texture usage (less wasted space) and decrease rendering overdraw.

Parameters
valuethe new value

◆ SetBillboardTrunkReductionRatio()

virtual void SimplygonSDK::IFoliageSettings::SetBillboardTrunkReductionRatio ( float  value)
pure virtual

Determines the triangle reduction ratio for the trunk part that has been separated from the foliage part based on the "separate foliage" settings.

Parameters
valuethe new value

◆ SetBillboardTwoSided()

virtual void SimplygonSDK::IFoliageSettings::SetBillboardTwoSided ( bool  value)
pure virtual

Determines if the foliage is intended to be viewed from both sides without back face culling.

Parameters
valuethe new value

◆ SetBillboardUseVisibilityWeights()

virtual void SimplygonSDK::IFoliageSettings::SetBillboardUseVisibilityWeights ( bool  value)
pure virtual

Determines whether to prioritize accurately mapping triangles with higher visibility to billboards.

Parameters
valuethe new value

◆ SetFlipbookNumberOfViews()

virtual void SimplygonSDK::IFoliageSettings::SetFlipbookNumberOfViews ( unsigned int  value)
pure virtual

Determines the number of views generated for the flip book impostor.

Parameters
valuethe new value

◆ SetFlipbookVerticalAngleInRadians()

virtual void SimplygonSDK::IFoliageSettings::SetFlipbookVerticalAngleInRadians ( float  value)
pure virtual

Determines the vertical angle of the views to generate for the flip book impostor. 0 radians: Looking horizontally at the scene. pi/2 radians: Looking at the scene from above. -pi/2 radians: Looking at the scene from below.

Parameters
valuethe new value

◆ SetFoliageType()

virtual void SimplygonSDK::IFoliageSettings::SetFoliageType ( unsigned int  value)
pure virtual

Determines which type of Foliage impostor to generate. SG_FOLIAGETYPE_BILLBOARDS generates a static mesh with billboards. SG_FOLIAGETYPE_FLIPBOOK generates a mapping image representing a number of views around the scene.

Parameters
valueis the SG_FOLIAGETYPE_[...] value

◆ SetSeparateFoliageAreaThreshold()

virtual void SimplygonSDK::IFoliageSettings::SetSeparateFoliageAreaThreshold ( real  value)
pure virtual

Is used to separate the trunk from the foliage in a vegetation scene by finding each group of connected triangles in the scene and if the surface area is below (SeparateFoliageAreaThreshold * AreaOfTheLargestGroupInTheScene) it is treated as foliage and processed into billboards. The trunk is optimized using reduction. The range is 0->large value. 0 means nothing will be foliage, value larger than the maximum surface area means everything will be foliage.

Parameters
valuethe new value

◆ SetSeparateFoliageSizeThreshold()

virtual void SimplygonSDK::IFoliageSettings::SetSeparateFoliageSizeThreshold ( real  value)
pure virtual

Is used to separate the trunk from the foliage in a vegetation scene by finding each group of connected triangles in the scene and if the diameter of the group is below (SeparateFoliageSizeThreshold * SceneDiameter) it is treated as foliage and processed into billboards. The trunk is optimized using reduction. The range is 0->large value. 0 means nothing will be foliage, value larger than the scene's diameter means everything will be foliage.

Parameters
valuethe new value

◆ SetSeparateFoliageTriangleRatio()

virtual void SimplygonSDK::IFoliageSettings::SetSeparateFoliageTriangleRatio ( float  value)
pure virtual

Is used to separate the trunk from the foliage in a vegetation scene by comparing each group of connected triangles in the scene with the scene's largest group. If a group's triangle count is below SeparateFoliageTriangleRatio * largestGrouptriangleCount it is treated as foliage and processed into billboards. The trunk is optimized using triangle reduction. The range is 0.0->1.0. 0.0 means nothing will be foliage, 1.0 means everything will be foliage.

Parameters
valuethe new value

◆ SetSeparateFoliageTriangleThreshold()

virtual void SimplygonSDK::IFoliageSettings::SetSeparateFoliageTriangleThreshold ( unsigned int  value)
pure virtual

Is used to separate the trunk from the foliage in a vegetation scene by finding each group of connected triangles in the scene and if the triangle count is below SeparateFoliageTriangleThreshold it is treated as foliage and processed into billboards. The trunk is optimized using reduction. The range is 0->large value. 0 means nothing will be foliage, value larger than the maximum triangle count means everything will be foliage.

Parameters
valuethe new value

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