BlankMat 0.1.0
Free open-source 3D texture creation application
Loading...
Searching...
No Matches
PLightCube Class Reference
Inheritance diagram for PLightCube:
Collaboration diagram for PLightCube:

Public Member Functions

void Draw (Shader *shader, State *state, Material *defaultMat, const glm::mat4 &viewProj, bool drawMats=false)
 
void SetParentModelMatrix (const glm::mat4 &parentModelMatrix)
 
void SetColor (const glm::vec3 &color) override
 
void SetPos (const glm::vec3 &pos) override
 
void SetDir (const glm::vec3 &dir) override
 
void LoadMaterials (MaterialContainer *materials, TextureContainer *textures) override
 
 PLightCube (const std::string &name, const std::string &scope, LightType type=LightType::POINT, const glm::vec3 &pos=glm::vec3(1.0f), const glm::vec3 &dir=glm::vec3(-1.0f), const glm::vec3 &color=glm::vec3(1.0f), float kd=1.0f, float ka=0.1f, float ks=0.5f, bool gamma=true, float range=13.0f, float spotInner=25, float spotOuter=35)
 
 PLightCube (float size, const std::string &name, const std::string &scope="", LightType type=LightType::POINT, MaterialContainer *materials=nullptr, TextureContainer *textures=nullptr, const glm::vec3 &pos=glm::vec3(-5.0f, 5.0f, 5.0f), const glm::vec3 &dir=glm::vec3(5.0f, 5.0f, 5.0f), const glm::vec3 &color=glm::vec3(1.0f), float kd=1.0f, float ka=0.1f, float ks=0.5f, bool gamma=true, float range=13.0f, float spotInner=25, float spotOuter=35)
 
 PLightCube (float size, MaterialContainer *materials, TextureContainer *textures, Config *config)
 
 ~PLightCube ()
 
- Public Member Functions inherited from Light
void UpdateShader (Shader *shader)
 
bool IsCube ()
 
LightType GetType ()
 
glm::vec3 GetColor ()
 
glm::vec3 GetBaseColor ()
 
glm::vec3 GetOffset ()
 
glm::vec3 GetDir ()
 
glm::vec3 GetPos ()
 
float GetKD ()
 
float GetKA ()
 
float GetKS ()
 
bool GetGamma ()
 
float GetRange ()
 
float GetSpotInnerRadius ()
 
float GetSpotOuterRadius ()
 
virtual void SetBaseColor (const glm::vec3 &color)
 
virtual void SetOffset (const glm::vec3 &offset)
 
virtual void SetKD (const float kd)
 
virtual void SetKA (const float ka)
 
virtual void SetKS (const float ks)
 
virtual void SetGamma (const bool gamma)
 
virtual void SetSpotInnerRadius (const float innerRadius)
 
virtual void SetSpotOuterRadius (const float outerRadius)
 
virtual void SetType (const LightType type)
 
void UpdateRotatingLight (bool isRotating)
 
void UpdateDiscoLight (bool isDisco)
 
void SetRange (const float lightRange)
 
 Light (const std::string &name="default", const std::string &scope="", LightType type=LightType::POINT, const glm::vec3 &pos=glm::vec3(1.0f), const glm::vec3 &dir=glm::vec3(-1.0f), const glm::vec3 &color=glm::vec3(1.0f), float kd=1.0f, float ka=0.1f, float ks=0.5f, bool gamma=true, float range=13.0f, float spotInner=25, float spotOuter=35)
 
 Light (Config *config)
 
- Public Member Functions inherited from ISelectable
virtual SelectableType GetSelectableType ()
 Returns the type of the selectable.
 
 ISelectable (SelectableType type=SelectableType::NONE)
 Sets the type of the selectable.
 
- Public Member Functions inherited from INameable
virtual void Rename (const std::string &newName, bool includeScope=true)
 Renames the object, setting the scope to be the scoped part of the name.
 
virtual void SetName (const std::string &name)
 Sets the name of the object. Note: Does not set the scope variable. If renaming based on raw input, use Rename() instead to set the scope.
 
virtual void SetScope (const std::string &scope)
 Sets the scope of the object.
 
std::string GetUnscopedName ()
 Returns the unscoped name of the object.
 
std::string GetScope ()
 Returns the scope of the object.
 
std::string GetScopedName ()
 Returns the scoped name of the object.
 
void InitName (const std::string &name, const std::string &scope="")
 Initializes the nameable object with the given name and scope.
 
 INameable ()
 Creates a default nameable object without name or scope.
 

Protected Attributes

PCubemCube
 
PLinemDirLine
 
- Protected Attributes inherited from Light
glm::vec3 mColor = glm::vec3(1.0f)
 
glm::vec3 mBaseColor = glm::vec3(1.0f)
 
glm::vec3 mOffset = glm::vec3(0.0f)
 
glm::vec3 mDir = glm::vec3(5, -5, -5)
 
glm::vec3 mPos = glm::vec3(-5, 5, 5)
 
LightType mType = LightType::POINT
 
bool mIsCube = false
 
float mKD = 1.0f
 
float mKA = 0.1f
 
float mKS = 1.0f
 
bool mGamma = false
 
float mPointC
 
float mPointL
 
float mPointQ
 
float mLightRange
 
float mSpotInner = 25.0f
 
float mSpotOuter = 35.0f
 
glm::mat4 mLightSpace
 
float mNearPlane
 
float mFarPlane
 
float mLightSize
 
- Protected Attributes inherited from ISelectable
SelectableType mSelectableType = SelectableType::NONE
 Type of the selectable.
 
- Protected Attributes inherited from INameable
std::string mName = ""
 Name of the object.
 
std::string mScope = ""
 Scope of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from Light
void CalcMatrices ()
 

Constructor & Destructor Documentation

◆ PLightCube() [1/3]

PLightCube::PLightCube ( const std::string &  name,
const std::string &  scope,
LightType  type = LightType::POINT,
const glm::vec3 &  pos = glm::vec3(1.0f),
const glm::vec3 &  dir = glm::vec3(-1.0f),
const glm::vec3 &  color = glm::vec3(1.0f),
float  kd = 1.0f,
float  ka = 0.1f,
float  ks = 0.5f,
bool  gamma = true,
float  range = 13.0f,
float  spotInner = 25,
float  spotOuter = 35 
)
inline

◆ PLightCube() [2/3]

PLightCube::PLightCube ( float  size,
const std::string &  name,
const std::string &  scope = "",
LightType  type = LightType::POINT,
MaterialContainer materials = nullptr,
TextureContainer textures = nullptr,
const glm::vec3 &  pos = glm::vec3(-5.0f, 5.0f, 5.0f),
const glm::vec3 &  dir = glm::vec3(5.0f, 5.0f, 5.0f),
const glm::vec3 &  color = glm::vec3(1.0f),
float  kd = 1.0f,
float  ka = 0.1f,
float  ks = 0.5f,
bool  gamma = true,
float  range = 13.0f,
float  spotInner = 25,
float  spotOuter = 35 
)
inline

◆ PLightCube() [3/3]

PLightCube::PLightCube ( float  size,
MaterialContainer materials,
TextureContainer textures,
Config config 
)
inline

◆ ~PLightCube()

PLightCube::~PLightCube ( )
inline

Member Function Documentation

◆ Draw()

void PLightCube::Draw ( Shader shader,
State state,
Material defaultMat,
const glm::mat4 &  viewProj,
bool  drawMats = false 
)
inlinevirtual

Reimplemented from Light.

◆ LoadMaterials()

void PLightCube::LoadMaterials ( MaterialContainer materials,
TextureContainer textures 
)
inlineoverridevirtual

Reimplemented from Light.

◆ SetColor()

void PLightCube::SetColor ( const glm::vec3 &  color)
inlineoverridevirtual

Reimplemented from Light.

◆ SetDir()

void PLightCube::SetDir ( const glm::vec3 &  dir)
inlineoverridevirtual

Reimplemented from Light.

◆ SetParentModelMatrix()

void PLightCube::SetParentModelMatrix ( const glm::mat4 &  parentModelMatrix)
inline

◆ SetPos()

void PLightCube::SetPos ( const glm::vec3 &  pos)
inlineoverridevirtual

Reimplemented from Light.

Member Data Documentation

◆ mCube

PCube* PLightCube::mCube
protected

◆ mDirLine

PLine* PLightCube::mDirLine
protected