HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_AreaLight Class Reference

Area light. Light whose source has a funky shape. More...

#include <GR_LightTypes.h>

+ Inheritance diagram for GR_AreaLight:

Public Types

enum  Shapes {
  RECTANGLE, ELLIPSE, ELLIPSOID, CYLINDER,
  GEOMETRY
}
 
- Public Types inherited from GR_Light
enum  LightType {
  AMBIENT, DISTANT, POINT, ENVIRONMENT,
  AREA
}
 

Public Member Functions

 GR_AreaLight (const UT_StringHolder &name, LightType type=GR_Light::AREA)
 
 ~GR_AreaLight () override
 
 UT_NON_COPYABLE (GR_AreaLight)
 
 LIGHTPARM_SM (UT_Vector3F, Pos)
 
 LIGHTPARM_SM (UT_Vector4F, XAxis)
 
 LIGHTPARM_SM (UT_Vector4F, YAxis)
 
 LIGHTPARM_SM (UT_Vector4F, ZAxis)
 
 LIGHTPARM_SM (int32, IsSingleSided)
 
 LIGHTPARM_SM (int32, IsReversed)
 
 LIGHTPARM (UT_Vector3F, Color)
 
 LIGHTPARM (fpreal32, DiffuseIntensity)
 
 LIGHTPARM (fpreal32, SpecularIntensity)
 
 LIGHTPARM (fpreal32, BoundingRadius)
 
 LIGHTPARM (int32, UseBoundingRadius)
 
 LIGHTPARM (int32, UseSpotlight)
 
 LIGHTPARM (UT_Vector2F, LeftBarn)
 
 LIGHTPARM (UT_Vector2F, RightBarn)
 
 LIGHTPARM (UT_Vector2F, TopBarn)
 
 LIGHTPARM (UT_Vector2F, BottomBarn)
 
 LIGHTPARM (fpreal32, Cutoff)
 
 LIGHTPARM (fpreal32, Falloff)
 
 LIGHTPARM (fpreal32, SpotRolloff)
 
 SHADOWPARM (UT_Matrix4F, ShadowTransform)
 
unsigned setupShadowRenders (RE_RenderContext r, GR_RenderMode &out_render_mode, bool scene_changed, unsigned shadowmap_size, const GR_DistantShadowMapParms &) override
 
void startShadowRender (RE_RenderContext, unsigned shadowmap_index) override
 
void finishShadowRender (RE_RenderContext) override
 
void finishShadowRenders (RE_RenderContext) override
 
bool needsShadowMap () override
 
bool hasShadowMap () override
 
void attachShadowMap (RE_RenderContext) override
 
void clearShadowMap () override
 
void setShadowMask (const UT_StringHolder &mask) override
 
bool canRayTraceShadow () const override
 
bool initBlocks (RV_Render *r, const GR_CommonDispOption &opts) override
 
RV_ShaderProgramgetShader (bool shadows, bool per_sample, bool is_antialiased, bool is_raytrace) override
 
void setShape (const Shapes shape)
 
Shapes getShape ()
 
void setGeometryLook (GUI_DetailLook *look)
 
GUI_DetailLookgetGeometryLook () const
 
UT_UniquePtr< RV_Geometry > & getGeometry ()
 
void setTransform (const UT_Matrix4F &t)
 
const UT_Matrix4FgetTransform () const
 
void setSize (fpreal w, fpreal h)
 
fpreal getWidth () const
 
fpreal getHeight () const
 
- Public Member Functions inherited from GR_Light
LightType type () const
 
bool isHeadlight () const
 
void setHeadlight (bool e)
 
bool isEnabled () const
 
void setEnabled (bool e)
 
bool canShadow () const
 
void setCanShadow (bool e)
 
void setLightID (exint id)
 
void setInstanceTransforms (const UT_Matrix4FArray &transforms, const UT_Vector4FArray &colors)
 
bool isInstanced () const
 
int numInstances () const
 
bool initSceneSetForRender (RV_Render *r, RV_ShaderProgram *shader, UT_UniquePtr< RV_ShaderBlock > &scene_block, UT_UniquePtr< RV_ShaderVariableSet > &scene_set)
 
bool initLightSetForRender (RV_Render *r, RV_ShaderProgramBase *shader)
 
bool bindSets (RV_Render *r, RV_ShaderProgramBase *shader)
 
bool isDirty () const
 
void setLightLink (const UT_StringHolder &link)
 
const UT_StringHolderlightLink () const
 
const UT_StringHoldershadowMask () const
 
- Public Member Functions inherited from GR_SceneItem
const UT_StringHoldername () const
 
exint id () const
 
int64 getVersion () const
 
void setVersion (int64 v)
 
void incref ()
 
void decref ()
 
void setName (const UT_StringHolder &name)
 
void setID (int id)
 

Additional Inherited Members

- Static Public Member Functions inherited from GR_Light
static RV_ShaderProgramgetAmbientOcclusionShader (bool is_raytrace)
 
static bool initShaders (RV_Instance *inst)
 
static void cleanupShaders ()
 
- Protected Types inherited from GR_Light
enum  { GLOBAL_SET = 0, LIGHT_SET = 1 }
 
- Protected Member Functions inherited from GR_Light
 GR_Light (const UT_StringHolder &name, LightType type)
 
 ~GR_Light () override
 
 UT_NON_COPYABLE (GR_Light)
 
bool privInitBlocks (RV_Render *r, void *light_block, int light_size, void *shadow_block, int shadow_size)
 
void privBindTexture (RV_Render *r, const UT_StringHolder &map_name, int rel_op_id, RV_TextureRef &map_id, const UT_StringHolder &sampler_name, const GR_CommonDispOption &opts, RV_TextureParms *tex_parms=nullptr, bool is_cube=false)
 
void initTexParms (RV_Render *r, const GR_CommonDispOption &opts, RV_TextureParms &parms) const
 
- Protected Member Functions inherited from GR_SceneItem
 GR_SceneItem (const UT_StringHolder &name, int id)
 
virtual ~GR_SceneItem ()
 
 UT_NON_COPYABLE (GR_SceneItem)
 
- Static Protected Member Functions inherited from GR_Light
static RV_ShaderProgramprivGetShader (exint tags)
 
- Protected Attributes inherited from GR_Light
bool myDirtyFlag
 
bool myShadowDirtyFlag
 
bool mySetBound
 
UT_StringHolder myShadowMask
 
- Static Protected Attributes inherited from GR_Light
static LightTag Tag
 

Detailed Description

Area light. Light whose source has a funky shape.

Definition at line 441 of file GR_LightTypes.h.

Member Enumeration Documentation

Enumerator
RECTANGLE 
ELLIPSE 
ELLIPSOID 
CYLINDER 
GEOMETRY 

Definition at line 448 of file GR_LightTypes.h.

Constructor & Destructor Documentation

GR_AreaLight::GR_AreaLight ( const UT_StringHolder name,
LightType  type = GR_Light::AREA 
)
GR_AreaLight::~GR_AreaLight ( )
override

Member Function Documentation

void GR_AreaLight::attachShadowMap ( RE_RenderContext  )
overridevirtual

Reimplemented from GR_Light.

bool GR_AreaLight::canRayTraceShadow ( ) const
inlineoverridevirtual

Reimplemented from GR_Light.

Definition at line 493 of file GR_LightTypes.h.

void GR_AreaLight::clearShadowMap ( )
overridevirtual

Reimplemented from GR_Light.

void GR_AreaLight::finishShadowRender ( RE_RenderContext  )
overridevirtual

Reimplemented from GR_Light.

void GR_AreaLight::finishShadowRenders ( RE_RenderContext  )
overridevirtual

Reimplemented from GR_Light.

UT_UniquePtr<RV_Geometry>& GR_AreaLight::getGeometry ( )
inline

Definition at line 506 of file GR_LightTypes.h.

GUI_DetailLook* GR_AreaLight::getGeometryLook ( ) const
inline

Definition at line 504 of file GR_LightTypes.h.

fpreal GR_AreaLight::getHeight ( ) const
inline

Definition at line 513 of file GR_LightTypes.h.

RV_ShaderProgram* GR_AreaLight::getShader ( bool  shadows,
bool  per_sample,
bool  is_antialiased,
bool  is_raytrace 
)
overridevirtual

Implements GR_Light.

Shapes GR_AreaLight::getShape ( )
inline

Definition at line 501 of file GR_LightTypes.h.

const UT_Matrix4F& GR_AreaLight::getTransform ( ) const
inline

Definition at line 509 of file GR_LightTypes.h.

fpreal GR_AreaLight::getWidth ( ) const
inline

Definition at line 512 of file GR_LightTypes.h.

bool GR_AreaLight::hasShadowMap ( )
inlineoverridevirtual

Implements GR_Light.

Definition at line 489 of file GR_LightTypes.h.

bool GR_AreaLight::initBlocks ( RV_Render r,
const GR_CommonDispOption opts 
)
overridevirtual

Implements GR_Light.

GR_AreaLight::LIGHTPARM ( UT_Vector3F  ,
Color   
)
GR_AreaLight::LIGHTPARM ( fpreal32  ,
DiffuseIntensity   
)
GR_AreaLight::LIGHTPARM ( fpreal32  ,
SpecularIntensity   
)
GR_AreaLight::LIGHTPARM ( fpreal32  ,
BoundingRadius   
)
GR_AreaLight::LIGHTPARM ( int32  ,
UseBoundingRadius   
)
GR_AreaLight::LIGHTPARM ( int32  ,
UseSpotlight   
)
GR_AreaLight::LIGHTPARM ( UT_Vector2F  ,
LeftBarn   
)
GR_AreaLight::LIGHTPARM ( UT_Vector2F  ,
RightBarn   
)
GR_AreaLight::LIGHTPARM ( UT_Vector2F  ,
TopBarn   
)
GR_AreaLight::LIGHTPARM ( UT_Vector2F  ,
BottomBarn   
)
GR_AreaLight::LIGHTPARM ( fpreal32  ,
Cutoff   
)
GR_AreaLight::LIGHTPARM ( fpreal32  ,
Falloff   
)
GR_AreaLight::LIGHTPARM ( fpreal32  ,
SpotRolloff   
)
GR_AreaLight::LIGHTPARM_SM ( UT_Vector3F  ,
Pos   
)
GR_AreaLight::LIGHTPARM_SM ( UT_Vector4F  ,
XAxis   
)
GR_AreaLight::LIGHTPARM_SM ( UT_Vector4F  ,
YAxis   
)
GR_AreaLight::LIGHTPARM_SM ( UT_Vector4F  ,
ZAxis   
)
GR_AreaLight::LIGHTPARM_SM ( int32  ,
IsSingleSided   
)
GR_AreaLight::LIGHTPARM_SM ( int32  ,
IsReversed   
)
bool GR_AreaLight::needsShadowMap ( )
inlineoverridevirtual

Implements GR_Light.

Definition at line 488 of file GR_LightTypes.h.

void GR_AreaLight::setGeometryLook ( GUI_DetailLook look)
inline

Definition at line 503 of file GR_LightTypes.h.

void GR_AreaLight::setShadowMask ( const UT_StringHolder mask)
overridevirtual

Reimplemented from GR_Light.

void GR_AreaLight::setShape ( const Shapes  shape)
inline

Definition at line 500 of file GR_LightTypes.h.

void GR_AreaLight::setSize ( fpreal  w,
fpreal  h 
)
inline

Definition at line 511 of file GR_LightTypes.h.

void GR_AreaLight::setTransform ( const UT_Matrix4F t)
inline

Definition at line 508 of file GR_LightTypes.h.

unsigned GR_AreaLight::setupShadowRenders ( RE_RenderContext  r,
GR_RenderMode out_render_mode,
bool  scene_changed,
unsigned  shadowmap_size,
const GR_DistantShadowMapParms  
)
overridevirtual

Implements GR_Light.

GR_AreaLight::SHADOWPARM ( UT_Matrix4F  ,
ShadowTransform   
)
void GR_AreaLight::startShadowRender ( RE_RenderContext  ,
unsigned  shadowmap_index 
)
overridevirtual

Reimplemented from GR_Light.

GR_AreaLight::UT_NON_COPYABLE ( GR_AreaLight  )

The documentation for this class was generated from the following file: