Table of Contents

Class ShapeSceneNode

Namespace
ValveResourceFormat.Renderer
Assembly
Renderer.dll

Base class for scene nodes that render primitive shapes like boxes, spheres, and capsules.

public abstract class ShapeSceneNode : SceneNode

Inheritance

Derived

Inherited Members

Fields

CapsuleTriangles

public const int CapsuleTriangles = 160

Field Value

int

HemisphereTriangles

public const int HemisphereTriangles = 72

Field Value

int

HemisphereVerts

public const int HemisphereVerts = 41

Field Value

int

Properties

CubemapResource

public static Lazy<Resource> CubemapResource { get; }

Property Value

Lazy<Resource>

IsTranslucent

public virtual bool IsTranslucent { get; }

Property Value

bool

IsTranslucentRenderMode

public bool IsTranslucentRenderMode { get; set; }

Property Value

bool

Shaded

protected virtual bool Shaded { get; }

Property Value

bool

ToolTexture

protected RenderTexture? ToolTexture { get; set; }

Property Value

RenderTexture?

indexCount

protected int indexCount { get; }

Property Value

int

shader

protected Shader shader { get; init; }

Property Value

Shader

vaoHandle

protected int vaoHandle { get; }

Property Value

int

Methods

AddBox(List<SimpleVertexNormal>, List<int>, Vector3, Vector3, Color32)

protected static void AddBox(List<SimpleVertexNormal> verts, List<int> inds, Vector3 minBounds, Vector3 maxBounds, Color32 color)

Parameters

verts List<SimpleVertexNormal>
inds List<int>
minBounds Vector3
maxBounds Vector3
color Color32

AddBox(List<SimpleVertex>, in AABB, Color32)

public static void AddBox(List<SimpleVertex> vertices, in AABB box, Color32 color)

Parameters

vertices List<SimpleVertex>
box AABB
color Color32

AddCapsule(List<SimpleVertexNormal>, List<int>, Vector3, Vector3, float, Color32)

protected static void AddCapsule(List<SimpleVertexNormal> verts, List<int> inds, Vector3 c0, Vector3 c1, float radius, Color32 color)

Parameters

verts List<SimpleVertexNormal>
inds List<int>
c0 Vector3
c1 Vector3
radius float
color Color32

AddFace(List<int>, int, int, int, int)

protected static void AddFace(List<int> inds, int a, int b, int c, int d)

Parameters

inds List<int>
a int
b int
c int
d int

AddHemisphere(List<SimpleVertexNormal>, List<int>, Vector3, float, Vector3, Color32)

protected static void AddHemisphere(List<SimpleVertexNormal> verts, List<int> inds, Vector3 center, float radius, Vector3 up, Color32 color)

Parameters

verts List<SimpleVertexNormal>
inds List<int>
center Vector3
radius float
up Vector3
color Color32

AddLine(List<SimpleVertex>, Vector3, Vector3, Color32)

public static void AddLine(List<SimpleVertex> vertices, Vector3 from, Vector3 to, Color32 color)

Parameters

vertices List<SimpleVertex>
from Vector3
to Vector3
color Color32

AddSphere(List<SimpleVertexNormal>, List<int>, Vector3, float, Color32)

protected static void AddSphere(List<SimpleVertexNormal> verts, List<int> inds, Vector3 center, float radius, Color32 color)

Parameters

verts List<SimpleVertexNormal>
inds List<int>
center Vector3
radius float
color Color32

AddTriangle(List<int>, int, int, int, int)

protected static void AddTriangle(List<int> inds, int baseVertex, int a, int b, int c)

Parameters

inds List<int>
baseVertex int
a int
b int
c int

CreateEnvCubemapSphere(Scene)

public static ModelSceneNode CreateEnvCubemapSphere(Scene scene)

Parameters

scene Scene

Returns

ModelSceneNode

GetOrtogonal(Vector3)

protected static Vector3 GetOrtogonal(Vector3 a)

Parameters

a Vector3

Returns

Vector3

GetOrtogonal(Vector3, Vector3)

protected static Vector3 GetOrtogonal(Vector3 a, Vector3 b)

Parameters

a Vector3
b Vector3

Returns

Vector3

GetSupportedRenderModes()

public override IEnumerable<string> GetSupportedRenderModes()

Returns

IEnumerable<string>

Render(RenderContext)

public override void Render(Scene.RenderContext context)

Parameters

context Scene.RenderContext

SetRenderMode(string)

public override void SetRenderMode(string mode)

Parameters

mode string