class Enlighten::IPrecompInputGeometry
└>Geo::IGeoSerialisable
└>Geo::IGeoReleasable
Handle to the InputGeometry.
Functions
Name | Description |
---|---|
AddMesh(IPrecompInputMesh *, const PrecompMeshProperties *) | Adds a Mesh to the geometry. |
AddMesh(const Geo::GeoRefReleasePtr< IPrecompInputMesh > &, const PrecompMeshProperties *) | Adds a Mesh to the geometry. |
Create() | Create a new IPrecompInputGeometry. This create function is primarily for serialisation purposes. |
GetClampUvs() | Accessor for the current clamping behaviour. |
GetHighQualityProjection() | Accessor for the current projection behaviour. |
GetId() | Returns the globally unique ID of this geometry. |
GetInputAtlasRectangleSizeOverride(Geo::s32 &, Geo::s32 &) | Get the override of the output lightmap resolution. |
GetMeshArray() | Read-only access to the meshes in this geometry. |
GetMeshArray() | Modifiable access to the meshes in this geometry. |
GetMeshPropertiesArray() | Read-only access to the properties of the meshes in this geometry. |
GetMeshPropertiesArray() | Write access to the properties of the meshes in this geometry. |
GetMeshSimplificationAutoOrientation() | Get the packer rotation flag. |
GetMinChartSizeInBlocks() | Get the minimum chart size in precompute blocks. |
GetName() | Gets the globally unique name of this geometry. |
GetNumLods() | Get number of Lods packing should generate for this input geometry. |
GetNumMeshes() | How many meshes in this geometry object. |
GetOutputPixelSize() | Get the output lightmap resolution. This is the unscaled output pixel size - bear in mind that instances of this geometry may apply scaling. |
GetPrecompBlockSize() | Get the precompute block size. |
GetTerrainU() | Get the U projection direction for terrain geometry. |
GetTerrainV() | Get the V projection direction for terrain geometry. |
GetUvSimpMaxNumSimplifications() | UV Simplification: get a maximum number of simplification to make. |
GetUvSimpNumIterationsPerSimplification() | UV Simplification: get the number of iterations to allow per simplification. |
IsTerrain() | Returns true is this Geometry is a terrain geometry. |
Load(IGeoInputStream &, Geo::u32) | Load an instance of this class from an IGeoInputStream. |
Release() | Free this object that was created within the Enlighten libraries. |
Save(IGeoStream &, Geo::u32) | Save an instance of this class to an IGeoStream. |
SetClampUvs(bool) | Set whether projected vertices should be clamped within the target chart when possible. |
SetHighQualityProjection(bool) | Set whether the projection should be done using uniform sampling of the mesh surface instead of only using the mesh vertices. |
SetId(Geo::GeoGuid) | Sets the globally unique ID of this geometry. |
SetIsTerrain(bool) | Set whether this geometry is part of the terrain. |
SetMeshSimplificationAutoOrientation(bool) | Enable/disable packer rotation. |
SetMinChartSizeInBlocks(Geo::s32) | Set the minimum chart size in precompute blocks. |
SetName(const char *) | Sets the globally unique name of this geometry. |
SetNumLods(Geo::s32) | Set number of Lods packing should generate for this input geometry. |
SetOutputPixelSize(float) | Set the output lightmap resolution. |
SetOutputPixelSize(float, Geo::s32, Geo::s32) | Set the output lightmap resolution. |
SetPrecompBlockSize(Geo::s32) | Set the precompute block size. |
SetTerrainU(Geo::v128 const &) | Set the U projection direction for terrain geometry. |
SetTerrainV(Geo::v128 const &) | Set the V projection direction for terrain geometry. |
SetUvSimpMaxNumSimplifications(Geo::s32) | UV Simplification: set a maximum number of simplification to make. |
SetUvSimpNumIterationsPerSimplification(Geo::s32) | UV Simplification: set the number of iterations to allow per simplification. |
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompInputGeometry::AddMesh
...
public: Geo::s32 AddMesh
(
IPrecompInputMesh * mesh,
const PrecompMeshProperties * properties
)
...
Adds a Mesh to the geometry.
Returns
Returns the internal array index the mesh as added as (-1 means fail). To save unnecessary copies this call takes ownership of the mesh pointer. This object will be responsible for freeing the resource when it's not longer in use - do not hang onto this pointer. (Note the lack of a const qualifier). It does take a copy of the properties data though. It is the clients responsibility to manage this resource. The caller should make a note of the returned index. You should use this index to lookup the generated uvs in the compiled packed geometry object, if required by the mesh properties.
Info | ||
---|---|---|
| ||
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompInputGeometry::AddMesh
...
public: Geo::s32 AddMesh
(
const Geo::GeoRefReleasePtr< IPrecompInputMesh > & mesh,
const PrecompMeshProperties * properties
)
...
Adds a Mesh to the geometry.
Returns
Returns the internal array index the mesh as added as (-1 means fail). To save unnecessary copies this call takes a reference-counted pointer to the mesh. Any other references to the mesh must also go through a Geo::GeoRefReleasePtr. It does take a copy of the properties data though. It is the clients responsibility to manage this resource. The caller should make a note of the returned index. You should use this index to lookup the generated uvs in the compiled packed geometry object, if required by the mesh properties.
Info | ||
---|---|---|
| ||
Anchor | ||||
---|---|---|---|---|
|
static IPrecompInputGeometry* Enlighten::IPrecompInputGeometry::Create
...
public: IPrecompInputGeometry * Create()
...
Create a new IPrecompInputGeometry. This create function is primarily for serialisation purposes.
Anchor | ||||
---|---|---|---|---|
|
virtual bool Enlighten::IPrecompInputGeometry::GetClampUvs
...
public: bool GetClampUvs() const
...
Accessor for the current clamping behaviour.
Anchor | ||||
---|---|---|---|---|
|
virtual bool Enlighten::IPrecompInputGeometry::GetHighQualityProjection
...
public: bool GetHighQualityProjection() const
...
Accessor for the current projection behaviour.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::GeoGuid Enlighten::IPrecompInputGeometry::GetId
...
public: Geo::GeoGuid GetId() const
...
Returns the globally unique ID of this geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::GetInputAtlasRectangleSizeOverride
...
public: void GetInputAtlasRectangleSizeOverride
(
Geo::s32 & fixedAtlasWidth,
Geo::s32 & fixedAtlasHeight
) const
...
Get the override of the output lightmap resolution.
Anchor | ||||
---|---|---|---|---|
|
virtual const IPrecompInputMesh* const* Enlighten::IPrecompInputGeometry::GetMeshArray
...
public: const IPrecompInputMesh *const * GetMeshArray() const
...
Read-only access to the meshes in this geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual IPrecompInputMesh* const* Enlighten::IPrecompInputGeometry::GetMeshArray
...
public: IPrecompInputMesh *const * GetMeshArray()
...
Modifiable access to the meshes in this geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual const PrecompMeshProperties* Enlighten::IPrecompInputGeometry::GetMeshPropertiesArray
...
public: const PrecompMeshProperties * GetMeshPropertiesArray() const
...
Read-only access to the properties of the meshes in this geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual PrecompMeshProperties* Enlighten::IPrecompInputGeometry::GetMeshPropertiesArray
...
public: PrecompMeshProperties * GetMeshPropertiesArray()
...
Write access to the properties of the meshes in this geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual bool Enlighten::IPrecompInputGeometry::GetMeshSimplificationAutoOrientation
...
public: bool GetMeshSimplificationAutoOrientation() const
...
Get the packer rotation flag.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetMinChartSizeInBlocks
...
public: Geo::s32 GetMinChartSizeInBlocks() const
...
Get the minimum chart size in precompute blocks.
Anchor | ||||
---|---|---|---|---|
|
virtual const char* Enlighten::IPrecompInputGeometry::GetName
...
public: const char * GetName() const
...
Gets the globally unique name of this geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetNumLods
...
public: Geo::s32 GetNumLods() const
...
Get number of Lods packing should generate for this input geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetNumMeshes
...
public: Geo::s32 GetNumMeshes() const
...
How many meshes in this geometry object.
Anchor | ||||
---|---|---|---|---|
|
virtual float Enlighten::IPrecompInputGeometry::GetOutputPixelSize
...
public: float GetOutputPixelSize() const
...
Get the output lightmap resolution. This is the unscaled output pixel size - bear in mind that instances of this geometry may apply scaling.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetPrecompBlockSize
...
public: Geo::s32 GetPrecompBlockSize() const
...
Get the precompute block size.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::v128 const& Enlighten::IPrecompInputGeometry::GetTerrainU
...
public: Geo::v128 const & GetTerrainU() const
...
Get the U projection direction for terrain geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::v128 const& Enlighten::IPrecompInputGeometry::GetTerrainV
...
public: Geo::v128 const & GetTerrainV() const
...
Get the V projection direction for terrain geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetUvSimpMaxNumSimplifications
...
public: Geo::s32 GetUvSimpMaxNumSimplifications() const
...
UV Simplification: get a maximum number of simplification to make.
Anchor | ||||
---|---|---|---|---|
|
virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetUvSimpNumIterationsPerSimplification
...
public: Geo::s32 GetUvSimpNumIterationsPerSimplification() const
...
UV Simplification: get the number of iterations to allow per simplification.
Anchor | ||||
---|---|---|---|---|
|
virtual bool Enlighten::IPrecompInputGeometry::IsTerrain
...
public: bool IsTerrain() const
...
Returns true is this Geometry is a terrain geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual bool Geo::IGeoSerialisable::Load
...
public: bool Load
(
IGeoInputStream & stream,
Geo::u32 section
)
...
Load an instance of this class from an IGeoInputStream.
The stream must be ready to read from. You can load sections of an object by passing a bitmask representing the desired sections rather than Iff::AllSectionsMask, which will load all sections. It is also safe to call this method on an object multiple times with different section arguments to load multiple parts.
Anchor | ||||
---|---|---|---|---|
|
virtual void Geo::IGeoReleasable::Release
...
public: void Release()
...
Free this object that was created within the Enlighten libraries.
Expect this to behave in a similar way to calling 'delete(this)'
Anchor | ||||
---|---|---|---|---|
|
virtual bool Geo::IGeoSerialisable::Save
...
public: bool Save
(
IGeoStream & stream,
Geo::u32 section
) const
...
Save an instance of this class to an IGeoStream.
The stream must be ready to write to. You can save sections of an object by passing a bitmask representing the desired sections rather than Iff::AllSectionsMask, which will save all sections that are available.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetClampUvs
...
public: void SetClampUvs
(
bool b
)
...
Set whether projected vertices should be clamped within the target chart when possible.
See the technical user manual for more details on this control. Defaults to true.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetHighQualityProjection
...
public: void SetHighQualityProjection
(
bool b
)
...
Set whether the projection should be done using uniform sampling of the mesh surface instead of only using the mesh vertices.
For meshes with triangles significantly larger than the output pixel size this may result in better results especially in cases of small overhangs in the detail mesh. Defaults to false.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetId
...
public: void SetId
(
Geo::GeoGuid id
)
...
Sets the globally unique ID of this geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetIsTerrain
...
public: void SetIsTerrain
(
bool isTerrain
)
...
Set whether this geometry is part of the terrain.
Terrain is treated specially by the precompute pipeline. If given Geometry is set to be terrain geometry, then it also needs to have, terrainU and terrainV directions set.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetMeshSimplificationAutoOrientation
...
public: void SetMeshSimplificationAutoOrientation
(
bool enabled
)
...
Enable/disable packer rotation.
Set this to enable or disable UV chart rotations while packing. In mesh simplification, the packing can attempt to orient UV charts to the horizontal axis which improves the packing quality. However, in cases where UVs have been sensibly authored previous to this step, this may be undesirable. The default is false.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetMinChartSizeInBlocks
...
public: void SetMinChartSizeInBlocks
(
Geo::s32 size
)
...
Set the minimum chart size in precompute blocks.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetName
...
public: void SetName
(
const char * name
)
...
Sets the globally unique name of this geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetNumLods
...
public: void SetNumLods
(
Geo::s32 numLods
)
...
Set number of Lods packing should generate for this input geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetOutputPixelSize
...
public: void SetOutputPixelSize
(
float size
)
...
Set the output lightmap resolution.
This gives the atlas packing stage a guide to how many pixels it should assign to this geometry. It defines the length of one edge of a radiosity pixel given in world units (as defined by the geometry).
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetOutputPixelSize
...
public: void SetOutputPixelSize
(
float size,
Geo::s32 fixedAtlasWidth,
Geo::s32 fixedAtlasHeight
)
...
Set the output lightmap resolution.
Defines the length of one edge of a radiosity pixel given in world units (as defined by the geometry) and also explicitly set how many pixels should be assigned.
Parameters
size | Length of one edge of output pixel; other system parameters are multiples of this. | |
fixedAtlasWidth | Force explicit atlas width. | |
fixedAtlasHeight | Force explicit atlas height. |
Note | ||
---|---|---|
| ||
The override is enabled when both the width and height are greater than zero. |
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetPrecompBlockSize
...
public: void SetPrecompBlockSize
(
Geo::s32 size
)
...
Set the precompute block size.
This defines the granularity of the packing algorithm and also the minimum resulting chart size in pixels. The precompute block size needs to be 2 or a multiple of 4. NOTE: All geometries of one system need to use the same value.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetTerrainU
...
public: void SetTerrainU
(
Geo::v128 const & terrainU
)
...
Set the U projection direction for terrain geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetTerrainV
...
public: void SetTerrainV
(
Geo::v128 const & terrainV
)
...
Set the V projection direction for terrain geometry.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetUvSimpMaxNumSimplifications
...
public: void SetUvSimpMaxNumSimplifications
(
Geo::s32 maxSimplificiations
)
...
UV Simplification: set a maximum number of simplification to make.
Once this number of simplifications have been found the process will stop trying to find others and continue with the rest of the uv generation and projection as normal. The algorithm will tend to find the most significant simplifications first, so this can be used to limit the amount of time and effort put into less interesting simplifications. Must be at least 1. The default is 100.
Anchor | ||||
---|---|---|---|---|
|
virtual void Enlighten::IPrecompInputGeometry::SetUvSimpNumIterationsPerSimplification
...
public: void SetUvSimpNumIterationsPerSimplification
(
Geo::s32 numIterations
)
...
UV Simplification: set the number of iterations to allow per simplification.
Greater iteration counts tend to find better simplifications, but take longer. Must be at least 1. The default is 300.