Documentation
¶
Index ¶
- type Bsp
- func (bsp *Bsp) ClusterLeafs() []ClusterLeaf
- func (bsp *Bsp) DefaultCluster() *ClusterLeaf
- func (bsp *Bsp) Mesh() mesh.IMesh
- func (bsp *Bsp) SetClusterLeafs(clusterLeafs []ClusterLeaf)
- func (bsp *Bsp) SetDefaultCluster(dispFaces ClusterLeaf)
- func (bsp *Bsp) SetVisibleClusters(clusterLeafs []*ClusterLeaf)
- func (bsp *Bsp) VisibleClusterLeafs() []*ClusterLeaf
- type ClusterLeaf
- type IModel
- type Model
- type StaticProp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bsp ¶
type Bsp struct {
// contains filtered or unexported fields
}
Bsp is a specialised model that represents an entire bsp map It is represented by a single mesh and a series of visiblity structures that dictate what can and can't be seen from a given point
func (*Bsp) ClusterLeafs ¶
func (bsp *Bsp) ClusterLeafs() []ClusterLeaf
ClusterLeafs returns all ClusterLeafs
func (*Bsp) SetClusterLeafs ¶
func (bsp *Bsp) SetClusterLeafs(clusterLeafs []ClusterLeaf)
SetClusterLeafs set the computed cluster leafs for a Bsp
func (*Bsp) SetDefaultCluster ¶
func (bsp *Bsp) SetDefaultCluster(dispFaces ClusterLeaf)
SetDefaultCluster
func (*Bsp) SetVisibleClusters ¶
func (bsp *Bsp) SetVisibleClusters(clusterLeafs []*ClusterLeaf)
SetVisibleClusters update the visible ClusterLeafs
func (*Bsp) VisibleClusterLeafs ¶
func (bsp *Bsp) VisibleClusterLeafs() []*ClusterLeaf
VisibleClusterLeafs returns clusterleafs that are known to be visible. This is not calculated here, only stored for faster reference
type ClusterLeaf ¶
type ClusterLeaf struct {
Id int16
Faces []mesh.Face
StaticProps []*StaticProp
DispFaces []int
Mins, Maxs mgl32.Vec3
Origin mgl32.Vec3
}
ClusterLeaf represents a single cluster that contains the contents of all the leafs that are contained within it
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model A collection of renderable primitives/submeshes
type StaticProp ¶
StaticProp is a somewhat specialised model that implements a few core entity features (largely because it is basically a renderable entity that cannot do anything or be reference)
func NewStaticProp ¶
func NewStaticProp(lumpProp game.IStaticPropDataLump, propLeafs *game.StaticPropLeafLump, renderable *Model) *StaticProp
NewStaticProp returns new StaticProp
func (*StaticProp) FadeMaxDistance ¶ added in v0.5.0
func (prop *StaticProp) FadeMaxDistance() float32
func (*StaticProp) FadeMinDistance ¶ added in v0.5.0
func (prop *StaticProp) FadeMinDistance() float32
func (*StaticProp) LeafList ¶
func (prop *StaticProp) LeafList() []uint16
LeafList returrns all leafs that this props is in
func (*StaticProp) Model ¶ added in v0.5.0
func (prop *StaticProp) Model() *Model
Model returns props model