OpenClonk
C4Texture Class Reference

#include <C4Texture.h>

Collaboration diagram for C4Texture:
[legend]

Public Member Functions

 C4Texture ()
 
 ~C4Texture ()
 
void SetAverageColor (uint32_t Color)
 
uint32_t GetAverageColor () const
 
void SetMaterialShape (class C4TextureShape *s)
 
class C4TextureShapeGetMaterialShape () const
 

Public Attributes

C4SurfaceSurface32
 

Protected Attributes

StdStrBuf Name
 
uint32_t AvgColor
 
std::unique_ptr< class C4TextureShapematerial_shape
 
C4TextureNext
 

Friends

class C4TextureMap
 

Detailed Description

Definition at line 29 of file C4Texture.h.

Constructor & Destructor Documentation

◆ C4Texture()

C4Texture::C4Texture ( )

Definition at line 29 of file C4Texture.cpp.

30 {
31  Surface32=nullptr;
32  AvgColor = 0x00000000;
33  Next=nullptr;
34 }
uint32_t AvgColor
Definition: C4Texture.h:43
C4Surface * Surface32
Definition: C4Texture.h:35
C4Texture * Next
Definition: C4Texture.h:45

References AvgColor, Next, and Surface32.

◆ ~C4Texture()

C4Texture::~C4Texture ( )

Definition at line 36 of file C4Texture.cpp.

37 {
38  delete Surface32;
39 }

References Surface32.

Member Function Documentation

◆ GetAverageColor()

uint32_t C4Texture::GetAverageColor ( ) const
inline

Definition at line 38 of file C4Texture.h.

38 { return AvgColor; }

References AvgColor.

◆ GetMaterialShape()

class C4TextureShape* C4Texture::GetMaterialShape ( ) const
inline

Definition at line 40 of file C4Texture.h.

40 { return material_shape.get(); }
std::unique_ptr< class C4TextureShape > material_shape
Definition: C4Texture.h:44

References material_shape.

Referenced by C4Landscape::P::ChunkOZoom(), C4Landscape::DrawBox(), C4Landscape::DrawBrush(), and C4Landscape::DrawLine().

Here is the caller graph for this function:

◆ SetAverageColor()

void C4Texture::SetAverageColor ( uint32_t  Color)
inline

Definition at line 37 of file C4Texture.h.

37 { AvgColor = Color; }

References AvgColor.

Referenced by C4TextureMap::AddTexture().

Here is the caller graph for this function:

◆ SetMaterialShape()

void C4Texture::SetMaterialShape ( class C4TextureShape s)
inline

Definition at line 39 of file C4Texture.h.

39 { material_shape.reset(s); }
#define s

References material_shape, and s.

Referenced by C4TextureMap::LoadTextures().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ C4TextureMap

friend class C4TextureMap
friend

Definition at line 31 of file C4Texture.h.

Member Data Documentation

◆ AvgColor

uint32_t C4Texture::AvgColor
protected

Definition at line 43 of file C4Texture.h.

Referenced by C4Texture(), GetAverageColor(), and SetAverageColor().

◆ material_shape

std::unique_ptr<class C4TextureShape> C4Texture::material_shape
protected

Definition at line 44 of file C4Texture.h.

Referenced by GetMaterialShape(), and SetMaterialShape().

◆ Name

◆ Next

◆ Surface32


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