DecalDataFile
Engine/source/T3D/decal/decalDataFile.h
This is the data file for decals.
Memory Management
Allocate a new, uninitialized DecalInstance.
_freeInstance(DecalInstance * decal)
Free the memory of the given DecalInstance.
Allocator for DecalInstances.
Instance Management
_addDecalToSpheres(DecalInstance * inst)
Add the given decal to the sphere list.
bool
_removeDecalFromSpheres(DecalInstance * inst)
Remove the decal from the sphere list.
The decal sphere that we have last insert an item into.
Vector< DecalSphere * >
List of bounding sphere shapes that contain and organize DecalInstances for optimized culling and lookup.
I/O
Decal Management
removeDecal(DecalInstance * inst)
Remove a decal from the file.
notifyDecalModified(DecalInstance * inst)
Let the file know that the data of the given decal has changed.
Protected Types
_Anonymous_ { FILE_VERSION = 5 }
Protected Attributes
bool
Set to true if the file is dirty and needs to be saved before being destroyed.
Public Functions
Vector< DecalSphere * > &
const Vector< DecalSphere * > &
bool
isDirty()
Return true if the decal data has been modified since the last save or load.
Detailed Description
This is the data file for decals.
Not intended to be used directly, do your work with decals via the DecalManager.
Memory Management
_allocateInstance()
Allocate a new, uninitialized DecalInstance.
_freeInstance(DecalInstance * decal)
Free the memory of the given DecalInstance.
FreeListChunker< DecalInstance > mChunker
Allocator for DecalInstances.
Instance Management
_addDecalToSpheres(DecalInstance * inst)
Add the given decal to the sphere list.
_removeDecalFromSpheres(DecalInstance * inst)
Remove the decal from the sphere list.
DecalSphere * mSphereWithLastInsertion
The decal sphere that we have last insert an item into.
This sphere is most likely to be a good candidate for the next insertion so test this sphere first.
Vector< DecalSphere * > mSphereList
List of bounding sphere shapes that contain and organize DecalInstances for optimized culling and lookup.
I/O
write(Stream & stream)
Write the decal data to the given stream.
read(Stream & stream)
Read the decal data from the given stream.
Decal Management
addDecal(const Point3F & pos, const Point3F & normal, const Point3F & tangent, DecalData * decalData, F32 decalScale, S32 decalTexIndex, U8 flags)
Create a new decal in this file using the given data.
removeDecal(DecalInstance * inst)
Remove a decal from the file.
notifyDecalModified(DecalInstance * inst)
Let the file know that the data of the given decal has changed.
Protected Types
@181
Enumerator
- FILE_VERSION = 5
Protected Attributes
bool mIsDirty
Set to true if the file is dirty and needs to be saved before being destroyed.
Public Functions
DecalDataFile()
~DecalDataFile()
clear()
Deletes all the data and resets the file to an empty state.
getSphereList()
getSphereList()
isDirty()
Return true if the decal data has been modified since the last save or load.