Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

class Enlighten::IPrecompInputGeometry

    └>Geo::IGeoSerialisable
        └>Geo::IGeoReleasable

Handle to the InputGeometry.

Functions

NameDescription
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
ad21475a33f89a77f9b48c2b6bcd51731
ad21475a33f89a77f9b48c2b6bcd51731

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
titleSee Also

PrecompMeshProperties


Anchor
a701c713fdfe1e1fa10dbf7c18cfa4e23
a701c713fdfe1e1fa10dbf7c18cfa4e23

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
titleSee Also

PrecompMeshProperties


Anchor
a8277e55dcf2e6f6dc76db9a5bbf99690
a8277e55dcf2e6f6dc76db9a5bbf99690

static IPrecompInputGeometry* Enlighten::IPrecompInputGeometry::Create

...

public: IPrecompInputGeometry * Create()

...

Create a new IPrecompInputGeometry. This create function is primarily for serialisation purposes.


Anchor
a9e2380c680c0cc31f6fa81e21eb2f2b8
a9e2380c680c0cc31f6fa81e21eb2f2b8

virtual bool Enlighten::IPrecompInputGeometry::GetClampUvs

...

public: bool GetClampUvs() const

...

Accessor for the current clamping behaviour.


Anchor
aad4e7bf34f00c7138ec5ca86d7297066
aad4e7bf34f00c7138ec5ca86d7297066

virtual bool Enlighten::IPrecompInputGeometry::GetHighQualityProjection

...

public: bool GetHighQualityProjection() const

...

Accessor for the current projection behaviour.


Anchor
aa4f6374948462541721d91f30b0d910b
aa4f6374948462541721d91f30b0d910b

virtual Geo::GeoGuid Enlighten::IPrecompInputGeometry::GetId

...

public: Geo::GeoGuid GetId() const

...

Returns the globally unique ID of this geometry.


Anchor
aab6ad73327b3102a20173fe0108cd534
aab6ad73327b3102a20173fe0108cd534

virtual void Enlighten::IPrecompInputGeometry::GetInputAtlasRectangleSizeOverride

...

public: void GetInputAtlasRectangleSizeOverride
(
    Geo::s32 & fixedAtlasWidth,
    Geo::s32 & fixedAtlasHeight
) const

...

Get the override of the output lightmap resolution.


Anchor
af073da445a2aa7c70ecbe576909331ef
af073da445a2aa7c70ecbe576909331ef

virtual const IPrecompInputMesh* const* Enlighten::IPrecompInputGeometry::GetMeshArray

...

public: const IPrecompInputMesh *const * GetMeshArray() const

...

Read-only access to the meshes in this geometry.


Anchor
a52e7996bce7fd033b13fc9c05d584d1a
a52e7996bce7fd033b13fc9c05d584d1a

virtual IPrecompInputMesh* const* Enlighten::IPrecompInputGeometry::GetMeshArray

...

public: IPrecompInputMesh *const * GetMeshArray()

...

Modifiable access to the meshes in this geometry.


Anchor
a81d08ad699f39981d50788b1075d9a78
a81d08ad699f39981d50788b1075d9a78

virtual const PrecompMeshProperties* Enlighten::IPrecompInputGeometry::GetMeshPropertiesArray

...

public: const PrecompMeshProperties * GetMeshPropertiesArray() const

...

Read-only access to the properties of the meshes in this geometry.


Anchor
a6557e1a7dbec7b959fdb58ebdf7cf19e
a6557e1a7dbec7b959fdb58ebdf7cf19e

virtual PrecompMeshProperties* Enlighten::IPrecompInputGeometry::GetMeshPropertiesArray

...

public: PrecompMeshProperties * GetMeshPropertiesArray()

...

Write access to the properties of the meshes in this geometry.


Anchor
af1200f0d22d949e9dd125c7099000e00
af1200f0d22d949e9dd125c7099000e00

virtual bool Enlighten::IPrecompInputGeometry::GetMeshSimplificationAutoOrientation

...

public: bool GetMeshSimplificationAutoOrientation() const

...

Get the packer rotation flag.


Anchor
ad207cdc5cc5b727cd9caf3fff10c16dd
ad207cdc5cc5b727cd9caf3fff10c16dd

virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetMinChartSizeInBlocks

...

public: Geo::s32 GetMinChartSizeInBlocks() const

...

Get the minimum chart size in precompute blocks.


Anchor
a81e5795ea59721b6a13f50cf61a2fbc7
a81e5795ea59721b6a13f50cf61a2fbc7

virtual const char* Enlighten::IPrecompInputGeometry::GetName

...

public: const char * GetName() const

...

Gets the globally unique name of this geometry.


Anchor
a748813ba1254f7936cc0c2c9d326fd44
a748813ba1254f7936cc0c2c9d326fd44

virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetNumLods

...

public: Geo::s32 GetNumLods() const

...

Get number of Lods packing should generate for this input geometry.


Anchor
abc277d1cb11c8685f06e6da8ac369100
abc277d1cb11c8685f06e6da8ac369100

virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetNumMeshes

...

public: Geo::s32 GetNumMeshes() const

...

How many meshes in this geometry object.


Anchor
ad8c7b81aab338c7edf917d2c6f033e1d
ad8c7b81aab338c7edf917d2c6f033e1d

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
a64840fe2c49736d95b48ff10dc391b30
a64840fe2c49736d95b48ff10dc391b30

virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetPrecompBlockSize

...

public: Geo::s32 GetPrecompBlockSize() const

...

Get the precompute block size.


Anchor
afb06971ef77d6c170acc79e7f0c497bc
afb06971ef77d6c170acc79e7f0c497bc

virtual Geo::v128 const& Enlighten::IPrecompInputGeometry::GetTerrainU

...

public: Geo::v128 const & GetTerrainU() const

...

Get the U projection direction for terrain geometry.


Anchor
aaac1b1c0cda889cae4b6eda4e232680d
aaac1b1c0cda889cae4b6eda4e232680d

virtual Geo::v128 const& Enlighten::IPrecompInputGeometry::GetTerrainV

...

public: Geo::v128 const & GetTerrainV() const

...

Get the V projection direction for terrain geometry.


Anchor
afe7fbb48fbfc2f922fde7a4b88e7c3e1
afe7fbb48fbfc2f922fde7a4b88e7c3e1

virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetUvSimpMaxNumSimplifications

...

public: Geo::s32 GetUvSimpMaxNumSimplifications() const

...

UV Simplification: get a maximum number of simplification to make.


Anchor
ac3609367e3f328b5cba5be078eed9ce3
ac3609367e3f328b5cba5be078eed9ce3

virtual Geo::s32 Enlighten::IPrecompInputGeometry::GetUvSimpNumIterationsPerSimplification

...

public: Geo::s32 GetUvSimpNumIterationsPerSimplification() const

...

UV Simplification: get the number of iterations to allow per simplification.


Anchor
a0e24a0df6e6b1d5da55b3282d561448f
a0e24a0df6e6b1d5da55b3282d561448f

virtual bool Enlighten::IPrecompInputGeometry::IsTerrain

...

public: bool IsTerrain() const

...

Returns true is this Geometry is a terrain geometry.


Anchor
ae5fb810c8f4470cb3c9fcb16c6f7f7fe
ae5fb810c8f4470cb3c9fcb16c6f7f7fe

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
af6bdf30b42adde386c428e9dc2821eb9
af6bdf30b42adde386c428e9dc2821eb9

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
a5b03439626a3dac9b9c27feb1a3978d3
a5b03439626a3dac9b9c27feb1a3978d3

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
ad978df6dc326c6242d1cb8f2fe1f25f2
ad978df6dc326c6242d1cb8f2fe1f25f2

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
a0daabe2edb5a020f6202f29714040789
a0daabe2edb5a020f6202f29714040789

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
a3fe02b6adc755bd6d64df5157fd537a9
a3fe02b6adc755bd6d64df5157fd537a9

virtual void Enlighten::IPrecompInputGeometry::SetId

...

public: void SetId
(
    Geo::GeoGuid id
)

...

Sets the globally unique ID of this geometry.


Anchor
aaf7212ea91f101e0b493d2fd82eaca5d
aaf7212ea91f101e0b493d2fd82eaca5d

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
a1bdfb3155821ab3b309da31168b79e2d
a1bdfb3155821ab3b309da31168b79e2d

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
af5ce15431b8bcf2a0cfa7a310ed1f8ac
af5ce15431b8bcf2a0cfa7a310ed1f8ac

virtual void Enlighten::IPrecompInputGeometry::SetMinChartSizeInBlocks

...

public: void SetMinChartSizeInBlocks
(
    Geo::s32 size
)

...

Set the minimum chart size in precompute blocks.


Anchor
ad9c0ca58b49659da69ed5c2ab002e2fb
ad9c0ca58b49659da69ed5c2ab002e2fb

virtual void Enlighten::IPrecompInputGeometry::SetName

...

public: void SetName
(
    const char * name
)

...

Sets the globally unique name of this geometry.


Anchor
a52624899a844075010616a1991a80b40
a52624899a844075010616a1991a80b40

virtual void Enlighten::IPrecompInputGeometry::SetNumLods

...

public: void SetNumLods
(
    Geo::s32 numLods
)

...

Set number of Lods packing should generate for this input geometry.


Anchor
acc6f18f20b83313f76d14434df762857
acc6f18f20b83313f76d14434df762857

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
a7109a5e080a0eaa5ef37c8d3f2104f80
a7109a5e080a0eaa5ef37c8d3f2104f80

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
titleNote

The override is enabled when both the width and height are greater than zero.


Anchor
aa5b25096e5d224c0c3f87e0688bdd5ba
aa5b25096e5d224c0c3f87e0688bdd5ba

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
a36f30b22e3852c3205966371dfafcf18
a36f30b22e3852c3205966371dfafcf18

virtual void Enlighten::IPrecompInputGeometry::SetTerrainU

...

public: void SetTerrainU
(
    Geo::v128 const & terrainU
)

...

Set the U projection direction for terrain geometry.


Anchor
ad1333a125c9162b73893ca73112db657
ad1333a125c9162b73893ca73112db657

virtual void Enlighten::IPrecompInputGeometry::SetTerrainV

...

public: void SetTerrainV
(
    Geo::v128 const & terrainV
)

...

Set the V projection direction for terrain geometry.


Anchor
a950b8178ad8a44b8db670b86633125c8
a950b8178ad8a44b8db670b86633125c8

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
aa582ee95716e2ccdc4670b2aeb423861
aa582ee95716e2ccdc4670b2aeb423861

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.