RavEngine
Loading...
Searching...
No Matches
PxPvdSceneClient.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
26// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
27// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
28
29#ifndef PX_PVD_SCENE_CLIENT_H
30#define PX_PVD_SCENE_CLIENT_H
31
36#include "foundation/PxFlags.h"
37
38#if !PX_DOXYGEN
39namespace physx
40{
41#endif
42 namespace pvdsdk
43 {
44 class PvdClient;
45 }
46 struct PxDebugPoint;
47 struct PxDebugLine;
48 struct PxDebugTriangle;
49 struct PxDebugText;
50#if !PX_DOXYGEN
51} // namespace physx
52#endif
53
54#if !PX_DOXYGEN
55namespace physx
56{
57#endif
58
63{
64 enum Enum
65 {
66 eTRANSMIT_CONTACTS = (1 << 0),
68 eTRANSMIT_CONSTRAINTS = (1 << 2)
69 };
70};
71
78PX_FLAGS_OPERATORS(PxPvdSceneFlag::Enum, PxU8)
79
80
86{
87 public:
93 virtual void setScenePvdFlag(PxPvdSceneFlag::Enum flag, bool value) = 0;
94
99 virtual void setScenePvdFlags(PxPvdSceneFlags flags) = 0;
100
105
109 virtual void updateCamera(const char* name, const PxVec3& origin, const PxVec3& up, const PxVec3& target) = 0;
110
114 virtual void drawPoints(const physx::PxDebugPoint* points, PxU32 count) = 0;
115
119 virtual void drawLines(const physx::PxDebugLine* lines, PxU32 count) = 0;
120
124 virtual void drawTriangles(const physx::PxDebugTriangle* triangles, PxU32 count) = 0;
125
129 virtual void drawText(const physx::PxDebugText& text) = 0;
130
135
136protected:
137 virtual ~PxPvdSceneClient(){}
138};
139
140#if !PX_DOXYGEN
141} // namespace physx
142#endif
143
145#endif
Container for bitfield flag variables associated with a specific enum type.
Definition PxFlags.h:73
Special client for PxScene. It provides access to the PxPvdSceneFlag. It also provides simple user de...
Definition PxPvdSceneClient.h:86
virtual void drawPoints(const physx::PxDebugPoint *points, PxU32 count)=0
virtual void setScenePvdFlag(PxPvdSceneFlag::Enum flag, bool value)=0
virtual void drawText(const physx::PxDebugText &text)=0
virtual void drawLines(const physx::PxDebugLine *lines, PxU32 count)=0
virtual void updateCamera(const char *name, const PxVec3 &origin, const PxVec3 &up, const PxVec3 &target)=0
virtual physx::pvdsdk::PvdClient * getClientInternal()=0
virtual void setScenePvdFlags(PxPvdSceneFlags flags)=0
virtual PxPvdSceneFlags getScenePvdFlags() const =0
virtual void drawTriangles(const physx::PxDebugTriangle *triangles, PxU32 count)=0
3 Element vector class.
Definition PxVec3.h:50
PvdClient is the per-client connection to PVD. It provides callback when PVD is connected/disconnted....
Definition PxPvdClient.h:54
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PxFlags< PxPvdSceneFlag::Enum, PxU8 > PxPvdSceneFlags
Bitfield that contains a set of raised flags defined in PxPvdSceneFlag.
Definition PxPvdSceneClient.h:77
Used to store a single line and colour for debug rendering.
Definition PxRenderBuffer.h:85
Used to store a single point and colour for debug rendering.
Definition PxRenderBuffer.h:73
Used to store a text for debug rendering. Doesn't own 'string' array.
Definition PxRenderBuffer.h:115
Used to store a single triangle and colour for debug rendering.
Definition PxRenderBuffer.h:99
PVD scene Flags. They are disabled by default, and only works if PxPvdInstrumentationFlag::eDEBUG is ...
Definition PxPvdSceneClient.h:63
Enum
Definition PxPvdSceneClient.h:65
@ eTRANSMIT_CONSTRAINTS
Transmits scene query stream to PVD.
Definition PxPvdSceneClient.h:68
@ eTRANSMIT_SCENEQUERIES
Transmits contact stream to PVD.
Definition PxPvdSceneClient.h:67