File: SortedCube.h

package info (click to toggle)
libwildmagic 5.13-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 89,572 kB
  • ctags: 26,264
  • sloc: cpp: 210,924; csh: 637; sh: 95; makefile: 36
file content (65 lines) | stat: -rw-r--r-- 1,439 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Geometric Tools, LLC
// Copyright (c) 1998-2014
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
//
// File Version: 5.0.0 (2010/01/01)

#ifndef SORTEDCUBE_H
#define SORTEDCUBE_H

#include "Wm5Node.h"
#include "Wm5Camera.h"
#include "Wm5TriMesh.h"

namespace Wm5
{

class SortedCube : public Node
{
    WM5_DECLARE_RTTI;
    WM5_DECLARE_NAMES;
    WM5_DECLARE_STREAM(SortedCube);

public:
    // Construction and destruction.
    SortedCube (Camera* camera,
        const std::string& xpName, const std::string& xmName,
        const std::string& ypName, const std::string& ymName,
        const std::string& zpName, const std::string& zmName);

    virtual ~SortedCube ();

    // Member access.
    void SetCamera (Camera* camera);

protected:
    void SortFaces ();
    virtual void GetVisibleSet (Culler& culler, bool noCull = false);

    CameraPtr mCamera;

    // 0 = face xp
    // 1 = face xm
    // 2 = face yp
    // 3 = face ym
    // 4 = face zp
    // 5 = face zm
    TriMeshPtr mFace[6];

    // bit 0 = face xp
    // bit 1 = face xm
    // bit 2 = face yp
    // bit 3 = face ym
    // bit 4 = face zp
    // bit 5 = face zm
    int mBackFacing;
};

WM5_REGISTER_STREAM(SortedCube);
typedef Pointer0<SortedCube> SortedCubePtr;

}

#endif