Support Forum       G3D Web Page     
Public Types | Public Member Functions | Public Attributes | List of all members
G3D::ParseOBJ::Options Class Reference

Public Types

enum  TexCoord1Mode {
  NONE,
  UNPACK_FROM_TEXCOORD0_Z,
  TEXCOORD0_ZW
}
 

Public Member Functions

 Options ()
 The sampler to use with Materials created for this model. More...
 
 Options (const Any &a)
 
bool operator== (const Options &other) const
 
Any toAny () const
 

Public Attributes

bool forceMaterialsWhite = false
 Force all materials to lambertian, but preserve bump maps and alpha maps. More...
 
ParseMTL::Options materialOptions
 
bool stripRefraction
 If true, set Ni = 1 for every material in the mtl file. More...
 
TexCoord1Mode texCoord1Mode
 

Member Enumeration Documentation

◆ TexCoord1Mode

Enumerator
NONE 

No texcoord1s will be read or generated (default)

UNPACK_FROM_TEXCOORD0_Z 

Compute.

texCoord1.x = floor(w / (2.0f * 2048.0f)) / 2048.0f
texCoord1.y = (w - 2.0f * 2048.0f * floor(w / (2.0f * 2048.0f))) / 2048.0f

This format allows third-party programs to preserve the texture coordinate during processing. The constant 2048 is chosen based on the internal precision of texture coordinates in 3DS Max.

TEXCOORD0_ZW 

Parse texture coordinates as (x0, y0, x1, y1).

This is nonstandard and will not allow most programs to preserve texture coordinates. However, most programs will also ignore the 3rd and 4th coordinate on load and thus the format is backwards compatible.

Constructor & Destructor Documentation

◆ Options() [1/2]

G3D::ParseOBJ::Options::Options ( )
inline

The sampler to use with Materials created for this model.

◆ Options() [2/2]

G3D::ParseOBJ::Options::Options ( const Any a)

Member Function Documentation

◆ operator==()

bool G3D::ParseOBJ::Options::operator== ( const Options other) const
inline

◆ toAny()

Any G3D::ParseOBJ::Options::toAny ( ) const

Member Data Documentation

◆ forceMaterialsWhite

bool G3D::ParseOBJ::Options::forceMaterialsWhite = false

Force all materials to lambertian, but preserve bump maps and alpha maps.

Referenced by operator==().

◆ materialOptions

ParseMTL::Options G3D::ParseOBJ::Options::materialOptions

Referenced by operator==().

◆ stripRefraction

bool G3D::ParseOBJ::Options::stripRefraction

If true, set Ni = 1 for every material in the mtl file.

Referenced by operator==().

◆ texCoord1Mode

TexCoord1Mode G3D::ParseOBJ::Options::texCoord1Mode

Referenced by operator==().


documentation generated on Wed Nov 24 2021 08:01:58 using doxygen 1.8.15