#include <Message_Messenger.hxx>
#include <gp_Quaternion.hxx>
#include <V3d_View.hxx>
+#include <V3d_Viewer.hxx>
#include <WNT_HIDSpaceMouse.hxx>
// =======================================================================
#include <PrsMgr_PresentationManager.hxx>
#include <TopLoc_Datum3D.hxx>
-#include <Graphic3d_GraphicDriver.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Prs3d_Presentation.hxx>
#include <Prs3d_PresentationShadow.hxx>
#include <PrsMgr_PresentableObject.hxx>
#include <PrsMgr_Presentation.hxx>
#include <PrsMgr_Presentations.hxx>
-#include <Standard_NoSuchObject.hxx>
-#include <Standard_Type.hxx>
-#include <TColStd_ListIteratorOfListOfTransient.hxx>
#include <V3d_View.hxx>
+#include <V3d_Viewer.hxx>
IMPLEMENT_STANDARD_RTTIEXT(PrsMgr_PresentationManager, Standard_Transient)
#ifndef _PrsMgr_PresentationManager_HeaderFile
#define _PrsMgr_PresentationManager_HeaderFile
-#include <Graphic3d_NameOfMaterial.hxx>
#include <Graphic3d_StructureManager.hxx>
#include <Graphic3d_ZLayerId.hxx>
-#include <Standard_Transient.hxx>
#include <PrsMgr_ListOfPresentations.hxx>
#include <Quantity_Color.hxx>
-#include <Quantity_NameOfColor.hxx>
-#include <Standard.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Type.hxx>
class Graphic3d_Structure;
typedef Graphic3d_Structure Prs3d_Presentation;
class Prs3d_Drawer;
class PrsMgr_Presentation;
class PrsMgr_PresentableObject;
-class Standard_NoSuchObject;
class V3d_Viewer;
DEFINE_STANDARD_HANDLE(PrsMgr_PresentationManager, Standard_Transient)
#include <TopExp_Explorer.hxx>
#include <TopoDS_Shape.hxx>
#include <V3d_View.hxx>
+#include <V3d_Viewer.hxx>
#include <ViewerTest.hxx>
#include <XmlDrivers_DocumentRetrievalDriver.hxx>
#include <XmlDrivers_DocumentStorageDriver.hxx>
// commercial license or contractual agreement.
#include <V3d_Plane.hxx>
+
#include <Graphic3d_Group.hxx>
#include <Graphic3d_AspectFillArea3d.hxx>
#include <Graphic3d_ArrayOfQuadrangles.hxx>
#include <gp_Pln.hxx>
+#include <V3d_Viewer.hxx>
IMPLEMENT_STANDARD_RTTIEXT(V3d_Plane,Standard_Transient)
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_ToolSphere.hxx>
#include <V3d_View.hxx>
+#include <V3d_Viewer.hxx>
IMPLEMENT_STANDARD_RTTIEXT (V3d_Trihedron, Standard_Transient)
#include <Aspect_Handle.hxx>
#include <Aspect_RenderingContext.hxx>
#include <Aspect_TypeOfTriedronPosition.hxx>
-
#include <Bnd_Box.hxx>
-
#include <gp_Ax3.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
-
#include <Graphic3d_BufferType.hxx>
#include <Graphic3d_Camera.hxx>
#include <Graphic3d_ClipPlane.hxx>
#include <Graphic3d_SequenceOfHClipPlane.hxx>
#include <Graphic3d_TypeOfShadingModel.hxx>
#include <Graphic3d_Vertex.hxx>
-
#include <Image_PixMap.hxx>
-
-#include <Standard_Transient.hxx>
-
#include <Quantity_TypeOfColor.hxx>
-
-#include <Standard.hxx>
-#include <Standard_Address.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_CString.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Type.hxx>
-
#include <TColStd_Array2OfReal.hxx>
#include <TColStd_ListIteratorOfListOfTransient.hxx>
-
#include <V3d_ImageDumpOptions.hxx>
+#include <V3d_ListOfLight.hxx>
+#include <V3d_Viewer.hxx>
#include <V3d_Trihedron.hxx>
#include <V3d_TypeOfAxe.hxx>
-
#include <V3d_TypeOfBackfacingModel.hxx>
#include <V3d_TypeOfOrientation.hxx>
#include <V3d_TypeOfView.hxx>
#include <V3d_TypeOfVisualization.hxx>
-#include <V3d_Viewer.hxx>
-#include <V3d_ViewerPointer.hxx>
class Aspect_Grid;
class Aspect_Window;
class Graphic3d_Group;
class Graphic3d_Structure;
class Graphic3d_TextureEnv;
-class Standard_MultiplyDefined;
-class Standard_TypeMismatch;
-class V3d_BadValue;
-class V3d_UnMapped;
-class V3d_View;
DEFINE_STANDARD_HANDLE(V3d_View, Standard_Transient)
//! Defines the application object VIEW for the
Standard_EXPORT void SetAxis (const Standard_Real X, const Standard_Real Y, const Standard_Real Z,
const Standard_Real Vx, const Standard_Real Vy, const Standard_Real Vz);
- //! Defines the shading model for the visualization. Various models are available.
- Standard_EXPORT void SetShadingModel (const Graphic3d_TypeOfShadingModel theShadingModel);
-
//! Sets the environment texture to use. No environment texture by default.
Standard_EXPORT void SetTextureEnv (const Handle(Graphic3d_TextureEnv)& theTexture);
//! the visual axis measured from the Y axis of the screen.
Standard_EXPORT Standard_Real Twist() const;
- //! Returns the current shading model.
+ //! Returns the current shading model; Graphic3d_TOSM_FRAGMENT by default.
Standard_EXPORT Graphic3d_TypeOfShadingModel ShadingModel() const;
+ //! Defines the shading model for the visualization.
+ Standard_EXPORT void SetShadingModel (const Graphic3d_TypeOfShadingModel theShadingModel);
+
Standard_EXPORT Handle(Graphic3d_TextureEnv) TextureEnv() const;
//! Returns the current visualisation mode.
private:
- V3d_ViewerPointer MyViewer;
+ V3d_Viewer* MyViewer;
V3d_ListOfLight myActiveLights;
gp_Dir myDefaultViewAxis;
gp_Pnt myDefaultViewPoint;
myGridEcho (Standard_True),
myGridEchoLastVert (ShortRealLast(), ShortRealLast(), ShortRealLast())
{
- myDefaultRenderingParams.ShadingModel = Graphic3d_TOSM_VERTEX;
+ //
}
// ========================================================================
#include <Aspect_GradientFillMethod.hxx>
#include <Aspect_GridDrawMode.hxx>
#include <Aspect_GridType.hxx>
-
#include <gp_Ax3.hxx>
#include <Graphic3d_StructureManager.hxx>
-#include <Graphic3d_TypeOfShadingModel.hxx>
#include <Graphic3d_Vertex.hxx>
#include <Graphic3d_ZLayerSettings.hxx>
-
-#include <Standard.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_CString.hxx>
-#include <Standard_ExtString.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Type.hxx>
-
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfTransient.hxx>
#include <TColStd_SequenceOfInteger.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
-
#include <V3d_ListOfLight.hxx>
#include <V3d_ListOfView.hxx>
#include <V3d_TypeOfOrientation.hxx>
#include <V3d_TypeOfView.hxx>
#include <V3d_TypeOfVisualization.hxx>
-
#include <Quantity_Color.hxx>
class Aspect_Grid;
//! Gives the default visualization mode.
void SetDefaultVisualization (const V3d_TypeOfVisualization theType) { myVisualization = theType; }
- //! Returns the default type of Shading
+ //! Returns the default type of Shading; Graphic3d_TOSM_FRAGMENT by default.
Graphic3d_TypeOfShadingModel DefaultShadingModel() const { return myDefaultRenderingParams.ShadingModel; }
//! Gives the default type of SHADING.
#include <ViewerTest.hxx>
#include <ViewerTest_CmdParser.hxx>
+#include <ViewerTest_AutoUpdater.hxx>
#include <Draw.hxx>
#include <TopLoc_Location.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_Trihedron.hxx>
#include <AIS_Axis.hxx>
-#include <PrsDim.hxx>
-#include <PrsDim_Relation.hxx>
#include <AIS_TypeFilter.hxx>
#include <AIS_SignatureFilter.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <Aspect_InteriorStyle.hxx>
#include <Aspect_Window.hxx>
+#include <Aspect_XRSession.hxx>
#include <Graphic3d_AspectFillArea3d.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Graphic3d_CStructure.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_PointAspect.hxx>
+#include <PrsDim.hxx>
+#include <PrsDim_Relation.hxx>
#include <Select3D_SensitiveWire.hxx>
#include <Select3D_SensitivePrimitiveArray.hxx>
#include <Select3D_SensitiveTriangulation.hxx>
#include <StdSelect_BRepOwner.hxx>
#include <StdSelect_ViewerSelector3d.hxx>
#include <TopTools_MapOfShape.hxx>
-#include <ViewerTest_AutoUpdater.hxx>
-#include <Aspect_XRSession.hxx>
+#include <V3d_Viewer.hxx>
#include <stdio.h>
#include <V3d_PositionalLight.hxx>
#include <V3d_SpotLight.hxx>
#include <V3d_Trihedron.hxx>
+#include <V3d_Viewer.hxx>
#include <tcl.h>
vmoveto 150 200
vstate -entities
vselect 150 200
-if { [vreadpixel 150 200 rgb name] != "BLACK" } { puts "Error: object is not clipped" }
-if { [vreadpixel 350 200 rgb name] != "PERU" } { puts "Error: object should NOT be selected" }
+if { [vreadpixel 150 200 rgb name] != "BLACK" } { puts "Error: object is not clipped" }
+if { [vreadpixel 350 200 rgb name] != "GOLDENROD" } { puts "Error: object should NOT be selected" }
vdump $imagedir/${casename}_1.png
# depth range starts behinds the picking ray
if { [string compare $command "shading"] == 0 } {
vinit View1
+ # prefer vertex shading
+ vrenderparams -shadingModel VERT
vdisplay -noupdate -redisplay res
vsetdispmode res 1
vfit