VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::Sky Class Reference

#include <scene/skybox/sky.h>

Public Member Functions

TextureatmosphereDummyTexture () const
const Vector3center () const
Vector3 centerWorldPos () const
bool depthWrite () const
GraphNodenode ()
void resetSkyMesh ()
void setCenter (const Vector3 &value)
void setDepthWrite (bool value)
void setType (int value)
 Sky (const std::shared_ptr< GraphicsDevice > &device, Scene *scene)
SkyMeshskyMesh ()
int type () const
void updateSkyMesh ()
 ~Sky ()

Detailed Description

Implementation of the sky. Sky manages the sky mesh, type, and dome center.

Definition at line 25 of file sky.h.

Constructor & Destructor Documentation

◆ Sky()

visutwin::canvas::Sky::Sky ( const std::shared_ptr< GraphicsDevice > & device,
Scene * scene )

Definition at line 16 of file sky.cpp.

◆ ~Sky()

visutwin::canvas::Sky::~Sky ( )

Definition at line 20 of file sky.cpp.

Member Function Documentation

◆ atmosphereDummyTexture()

Texture * visutwin::canvas::Sky::atmosphereDummyTexture ( ) const
inline

Returns the 1×1 dummy texture used when atmosphere is enabled without envAtlas. Used by the renderer to bind a valid texture at fragment slot 2.

Definition at line 59 of file sky.h.

◆ center()

const Vector3 & visutwin::canvas::Sky::center ( ) const
inline

Definition at line 47 of file sky.h.

◆ centerWorldPos()

Vector3 visutwin::canvas::Sky::centerWorldPos ( ) const

Compute the world-space position of the sky dome center. Transforms _center by the sky node's world transform.

Definition at line 125 of file sky.cpp.

◆ depthWrite()

bool visutwin::canvas::Sky::depthWrite ( ) const
inline

Definition at line 39 of file sky.h.

◆ node()

GraphNode * visutwin::canvas::Sky::node ( )
inline

Definition at line 55 of file sky.h.

◆ resetSkyMesh()

void visutwin::canvas::Sky::resetSkyMesh ( )

Definition at line 112 of file sky.cpp.

Referenced by updateSkyMesh().

◆ setCenter()

void visutwin::canvas::Sky::setCenter ( const Vector3 & value)
inline

the tripod center for dome/box sky types. The environment direction is computed relative to this point. Ignored for SKYTYPE_INFINITE.

Definition at line 46 of file sky.h.

◆ setDepthWrite()

void visutwin::canvas::Sky::setDepthWrite ( bool value)

Definition at line 32 of file sky.cpp.

◆ setType()

void visutwin::canvas::Sky::setType ( int value)

Definition at line 24 of file sky.cpp.

References updateSkyMesh().

◆ skyMesh()

SkyMesh * visutwin::canvas::Sky::skyMesh ( )

Definition at line 117 of file sky.cpp.

References updateSkyMesh().

◆ type()

int visutwin::canvas::Sky::type ( ) const
inline

Definition at line 36 of file sky.h.

◆ updateSkyMesh()


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