GetConceptualFaceUV2XYZ
The UV coordinates are expected to be both (inclusive) between 0. and 1., i.e. [0..1].
Note: the returned value is the exact location within the 3D model space
according to the internal definition. This can slightly differ from the
generated geometry because of segmentation.
Therefore the following code returns the same values for u and v (if proper values, i.e. both within range [0..1]):
double u = .., v = ..;
double x, y, z;
GetConceptualFaceUV2XYZ(conceptualFace, &x, &y, &z, u, v);
GetConceptualFaceUV2XYZ(conceptualFace, &u, &v, x, y, z);
The following code returns potentially not exactly the same values for x, y, z (if values are from resutling geometry):
double x = .., y = .., z = ..;
double u, v;
GetConceptualFaceUV2XYZ(conceptualFace, &u, &v, x, y, z);
GetConceptualFaceUV2XYZ(conceptualFace, &x, &y, &z, u, v);
Syntax
// // Strong typing definition // bool GetConceptualFaceUV2XYZ( OwlInstance owlInstance, int64_t index, double * x, double * y, double * z, double * Nx, double * Ny, double * Nz, double u, double v ); static inline bool GetConceptualFaceUV2XYZ( OwlInstance owlInstance, int64_t index, double * vector__VEC3, double * normal__VEC3, const double * in__VEC2 ) { return GetConceptualFaceUV2XYZ( owlInstance, index, &vector__VEC3[0], // x &vector__VEC3[1], // y &vector__VEC3[2], // z &normal__VEC3[0], // Nx &normal__VEC3[1], // Ny &normal__VEC3[2], // Nz in__VEC2[0], // u in__VEC2[1] // v ); } static inline bool GetConceptualFaceUV2XYZ( OwlInstance owlInstance, int64_t index, double * out__VEC3, const double * in__VEC2 ) { return GetConceptualFaceUV2XYZ( owlInstance, index, &out__VEC3[0], // x &out__VEC3[1], // y &out__VEC3[2], // z nullptr, // Nx nullptr, // Ny nullptr, // Nz in__VEC2[0], // u in__VEC2[1] // v ); } // // Weak typing definition // bool __declspec(dllexport) __stdcall GetConceptualFaceUV2XYZ( int64_t owlInstance, int64_t index, double * x, double * y, double * z, double * Nx, double * Ny, double * Nz, double u, double v ); static inline bool GetConceptualFaceUV2XYZ( int64_t owlInstance, int64_t index, double * vector__VEC3, double * normal__VEC3, const double * in__VEC2 ) { return GetConceptualFaceUV2XYZ( owlInstance, index, &vector__VEC3[0], // x &vector__VEC3[1], // y &vector__VEC3[2], // z &normal__VEC3[0], // Nx &normal__VEC3[1], // Ny &normal__VEC3[2], // Nz in__VEC2[0], // u in__VEC2[1] // v ); } static inline bool GetConceptualFaceUV2XYZ( int64_t owlInstance, int64_t index, double * out__VEC3, const double * in__VEC2 ) { return GetConceptualFaceUV2XYZ( owlInstance, index, &out__VEC3[0], // x &out__VEC3[1], // y &out__VEC3[2], // z nullptr, // Nx nullptr, // Ny nullptr, // Nz in__VEC2[0], // u in__VEC2[1] // v ); }
Property owlInstance
Size: 64 bit / 8 byte (value)Property index
Size: 64 bit / 8 byte (value)Property x
Size: 32 bit / 4 byte (reference)Property y
Size: 32 bit / 4 byte (reference)Property z
Size: 32 bit / 4 byte (reference)Property Nx
Size: 32 bit / 4 byte (reference)???.
Property Ny
Size: 32 bit / 4 byte (reference)???.
Property Nz
Size: 32 bit / 4 byte (reference)???.
Property u
Size: 64 bit / 8 byte (value)???.
Property v
Size: 64 bit / 8 byte (value)???.