LightsprintSDK 2021.08.08
rr::RRPointMaterial Struct Reference

#include <RRMaterial.h>

Inheritance diagram for rr::RRPointMaterial:
rr::RRMaterial rr::RRUniformlyAllocatedNonCopyable rr::RRUniformlyAllocated

Public Member Functions

RRPointMaterialoperator= (const RRMaterial &a)
 
RRPointMaterialoperator= (const RRPointMaterial &a)
 
 ~RRPointMaterial ()
 
- Public Member Functions inherited from rr::RRMaterial
 RRMaterial ()
 
void copyFrom (const RRMaterial &from)
 
bool operator== (const RRMaterial &a) const
 
void reset (bool twoSided)
 
void updateColorsFromTextures (const RRColorSpace *colorSpace, UniformTextureAction uniformTextureAction, bool updateEvenFromStubs)
 
unsigned createTexturesFromColors ()
 
void updateKeyingFromTransmittance ()
 
void updateSideBitsFromColors ()
 
void updateBumpMapType ()
 
bool validate (RRReal redistributedPhotonsLimit=0.98f)
 
void convertFromLinear (const RRColorSpace *colorSpace)
 
void convertToLinear (const RRColorSpace *colorSpace)
 
bool needsBlending () const
 
 ~RRMaterial ()
 
void getResponse (Response &response, BrdfType type=BRDF_ALL) const
 
void sampleResponse (Response &response, const RRVec3 &randomness, BrdfType type=BRDF_ALL) const
 
bool load (const RRString &filename, RRFileLocator *textureLocator)
 
bool save (const RRString &filename) const
 
- Public Member Functions inherited from rr::RRUniformlyAllocated
void * operator new (std::size_t n)
 
void * operator new[] (std::size_t n)
 
void operator delete (void *p, std::size_t n)
 
void operator delete[] (void *p, std::size_t n)
 

Additional Inherited Members

- Public Types inherited from rr::RRMaterial
enum  UniformTextureAction {
  UTA_KEEP ,
  UTA_DELETE ,
  UTA_NULL
}
 
enum  SpecularModel {
  PHONG = 0 ,
  BLINN_PHONG = 1 ,
  TORRANCE_SPARROW = 2 ,
  BLINN_TORRANCE_SPARROW = 3
}
 
enum  BrdfType {
  BRDF_NONE = 0 ,
  BRDF_DIFFUSE = 1 ,
  BRDF_SPECULAR = 2 ,
  BRDF_TRANSMIT = 4 ,
  BRDF_ALL = 7 ,
  NUM_BRDFS = 3
}
 
- Public Attributes inherited from rr::RRMaterial
RRSideBits sideBits [2]
 
Property diffuseReflectance
 
Property diffuseEmittance
 
Property specularReflectance
 
SpecularModel specularModel
 
RRReal specularShininess
 
Property specularTransmittance
 
bool specularTransmittanceInAlpha
 
bool specularTransmittanceKeyed
 
RRReal specularTransmittanceThreshold
 
bool specularTransmittanceMapInverted
 
bool specularTransmittanceBackground
 
RRReal refractionIndex
 
Property bumpMap
 
bool bumpMapTypeHeight
 
Property lightmap
 
unsigned minimalQualityForPointMaterials
 
RRString name
 
RRBufferpreview
 
- Protected Member Functions inherited from rr::RRUniformlyAllocatedNonCopyable
 RRUniformlyAllocatedNonCopyable ()
 
 ~RRUniformlyAllocatedNonCopyable ()
 

Detailed Description

RRMaterial optimized for use in RRObject::getPointMaterial(), not for general use.

RRPointMaterial creates and destructs faster than RRMaterial, because it does not own textures and name, it's just shallow copy for immediate consumption. So never manipulate textures and name in point materials.

Constructor & Destructor Documentation

◆ ~RRPointMaterial()

rr::RRPointMaterial::~RRPointMaterial ( )

Unlike RRMaterial, RRPointMaterial does not delete textures and name.

Member Function Documentation

◆ operator=() [1/2]

RRPointMaterial & rr::RRPointMaterial::operator= ( const RRMaterial a)

Fast and thread safe copy. getPointMaterial() implementations use it to copy triangle material to point material.

◆ operator=() [2/2]

RRPointMaterial & rr::RRPointMaterial::operator= ( const RRPointMaterial a)

Makes it possible to store pointmaterials in vector.