class
#include <esp/assets/Attributes.h>
AbstractPrimitiveAttributes Contents
attributes describing primitve render/collision objects - abstract class without pure virtual methods
Base classes
- class AbstractAttributes
- Base class for all implemented attributes.
Derived classes
- class CapsulePrimitiveAttributes
- attributes describing primitive capsule objects
- class ConePrimitiveAttributes
- class CubePrimitiveAttributes
- class CylinderPrimitiveAttributes
- class IcospherePrimitiveAttributes
- class UVSpherePrimitiveAttributes
Constructors, destructors, conversion operators
-
AbstractPrimitiveAttributes(bool isWireframe,
int primObjType,
const std::
string& primObjClassName, const std:: string& attributesClassKey) - ~AbstractPrimitiveAttributes() defaulted virtual
Public functions
-
void setHandle(const std::
string&) override - auto getIsWireframe() const -> bool
- void setUseTextureCoords(bool useTextureCoords)
- auto getUseTextureCoords() const -> bool
- void setUseTangents(bool tangents)
- auto getUseTangents() const -> bool
- void setNumRings(int rings)
- auto getNumRings() const -> int
- void setNumSegments(int segments)
- auto getNumSegments() const -> int
- void setHalfLength(double halfLength)
- auto getHalfLength() const -> double
-
auto getPrimObjClassName() const -> std::
string - auto getPrimObjType() const -> int
- auto isValidTemplate() -> bool virtual
- This will determine if the stated template has the required quantities needed to instantiate a primitive properly of desired type. AbstractPrimitiveAttributes is never valid for any primitive - should be overridden in prim-specific class.
- void buildHandle()
- Handle for primitive attribute-based templates should reflect the parameters used to construct the primitive, and so should only be set internally or when relevant values are set manually.
Protected functions
- auto isValueMultipleOfDivisor(int val, int div) -> bool
- Verifies that val is larger than, and a multiple of, divisor div.
-
auto getBoolDispStr(bool val) const -> std::
string -
auto buildHandleDetail() -> std::
string pure virtual
Function documentation
bool esp:: assets:: AbstractPrimitiveAttributes:: isValidTemplate() virtual
This will determine if the stated template has the required quantities needed to instantiate a primitive properly of desired type. AbstractPrimitiveAttributes is never valid for any primitive - should be overridden in prim-specific class.
Returns | whether or not the template holds valid data for desired primitive type. |
---|
bool esp:: assets:: AbstractPrimitiveAttributes:: isValueMultipleOfDivisor(int val,
int div) protected
Verifies that val is larger than, and a multiple of, divisor div.
Parameters | |
---|---|
val | the value to check |
div | the divsior (value to verify is greater than and a multiple of)
|
Returns | whether check passes |