Logo Search packages:      
Sourcecode: opencascade version File versions  Download package

AIS_TexturedShape Class Reference

#include <AIS_TexturedShape.hxx>

Inheritance diagram for AIS_TexturedShape:

AIS_Shape AIS_InteractiveObject SelectMgr_SelectableObject PrsMgr_PresentableObject MMgt_TShared Standard_Transient

List of all members.


Detailed Description

This class allows to map textures on shapes
Textures are image files.
The texture itself is parametrized in (0,1)x(0,1).
Each face of a shape located in
UV space is provided with these parameters:

the number of occurences of the texture on the face

Definition at line 91 of file AIS_TexturedShape.hxx.


Public Member Functions

virtual Standard_EXPORT
Standard_Boolean 
AcceptDisplayMode (const Standard_Integer aMode) const
virtual Standard_EXPORT
Standard_Boolean 
AcceptShapeDecomposition () const
 Returns true if the Interactive Object accepts shape decomposition.
.
Standard_EXPORT void AddSelection (const Handle(SelectMgr_Selection)&aSelection, const Standard_Integer aMode)
Standard_EXPORT void AddUser (const Handle(Standard_Transient)&aUser)
Standard_EXPORT AIS_TexturedShape (const TopoDS_Shape &shap)
 Initializes the textured shape ashape.
.
const Handle_AIS_Drawer & Attributes () const
 Returns the attributes settings.
.
virtual Standard_EXPORT const
Bnd_Box
BoundingBox ()
Standard_EXPORT void ClearOwner ()
virtual Standard_EXPORT void ClearSelected ()
Standard_EXPORT void ClearSelections (const Standard_Boolean update=Standard_False)
Standard_EXPORT void ClearUsers ()
virtual Standard_EXPORT void Color (Quantity_Color &aColor) const
virtual Standard_EXPORT
Quantity_NameOfColor 
Color () const
Standard_EXPORT
Aspect_TypeOfFacingModel 
CurrentFacingModel () const
 Returns the current facing model which is in effect.
.
const Handle_SelectMgr_Selection & CurrentSelection () const
 Returns the current selection in this framework.
.
virtual Standard_EXPORT
Standard_Integer 
DefaultDisplayMode () const
Standard_EXPORT Standard_Real Deflection () const
virtual Standard_EXPORT
Aspect_TypeOfDegenerateModel 
DegenerateModel (Quantity_Ratio &aRatio) const
virtual Standard_EXPORT void Delete () const
 Memory deallocator for transient classes.
Standard_EXPORT void DisableTextureModulate ()
 Disables texture modulation
.
Standard_Integer DisplayMode () const
virtual Standard_EXPORT const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object.
virtual Standard_EXPORT const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object.
Standard_EXPORT void EnableTextureModulate ()
 Enables texture modulation
.
Standard_EXPORT
Handle_AIS_InteractiveContext 
GetContext () const
 Returns the context pointer to the interactive context.
.
Standard_EXPORT
Handle_Prs3d_Presentation 
GetHilightPresentation (const Handle(PrsMgr_PresentationManager3d)&TheMgr)
const Handle_Standard_Transient & GetOwner () const
Standard_EXPORT Standard_Integer GetRefCount () const
 Get the reference counter of this object.
Standard_EXPORT Standard_Integer GetRefCount () const
 Get the reference counter of this object.
Standard_EXPORT
Handle_Prs3d_Presentation 
GetSelectPresentation (const Handle(PrsMgr_PresentationManager3d)&TheMgr)
Standard_EXPORT
Graphic3d_TransModeFlags 
GetTransformPersistenceMode () const
 Gets Transform Persistence Mode for this object
.
Standard_EXPORT gp_Pnt GetTransformPersistencePoint () const
 Gets point of transform persistence for this object
.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const
Standard_Boolean HasColor () const
 Returns true if the Interactive Object has color.
.
Standard_Boolean HasDisplayMode () const
virtual Standard_EXPORT
Standard_Integer 
HashCode (const Standard_Integer Upper) const
virtual Standard_EXPORT
Standard_Integer 
HashCode (const Standard_Integer Upper) const
Standard_Boolean HasHilightMode () const
 Returns true if the Interactive Object is in highlight mode.
.
Standard_EXPORT Standard_Boolean HasInteractiveContext () const
Standard_EXPORT Standard_Boolean HasLocation () const
Standard_EXPORT Standard_Boolean HasMaterial () const
 Returns true if the Interactive Object has a setting for material.
.
Standard_EXPORT Standard_Boolean HasOwner () const
virtual Standard_EXPORT
Standard_Boolean 
HasPolygonOffsets () const
 Returns Standard_True if <myDrawer> has non-null shading aspect
.
Standard_EXPORT Standard_Boolean HasPresentation () const
Standard_EXPORT Standard_Boolean HasSelection (const Standard_Integer aMode) const
Standard_EXPORT Standard_Boolean HasSelectionMode () const
Standard_Boolean HasSelectionPriority () const
Standard_EXPORT Standard_Boolean HasTransformation () const
 Returns TRUE when this object is transformed
.
Standard_EXPORT Standard_Boolean HasUsers () const
Standard_Boolean HasWidth () const
 Returns true if the Interactive Object has width.
.
Standard_Integer HilightMode () const
virtual Standard_EXPORT void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)&thePM, const Quantity_NameOfColor theColor, const Handle(SelectMgr_EntityOwner)&theOwner)
virtual Standard_EXPORT void HilightSelected (const Handle(PrsMgr_PresentationManager3d)&PM, const SelectMgr_SequenceOfOwner &Seq)
 Method which draws selected owners ( for fast presentation draw )
.
void Init ()
 Begins the iteration scanning for sensitive primitives.
.
virtual Standard_EXPORT
Standard_Boolean 
IsAutoHilight () const
Standard_Boolean IsInfinite () const
Standard_EXPORT Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName.
Standard_EXPORT Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type.
Standard_EXPORT Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName.
Standard_EXPORT Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type.
Standard_EXPORT Standard_Boolean IsKind (const Standard_CString theTypeName) const
Standard_EXPORT Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
Standard_EXPORT Standard_Boolean IsKind (const Standard_CString theTypeName) const
Standard_EXPORT Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
Standard_Boolean IsTransparent () const
 Returns true if there is a transparency setting.
.
const TopLoc_LocationLocation () const
virtual Standard_EXPORT
Graphic3d_NameOfMaterial 
Material () const
Standard_Boolean More () const
 Continues the iteration scanning for sensitive primitives.
.
virtual Standard_EXPORT
Standard_Integer 
NbPossibleSelection () const
void Next ()
 Continues the iteration scanning for sensitive primitives.
.
void operator delete (void *anAddress)
 Operator delete symmetric to operator new.
void operator delete (void *anAddress)
 Operator delete symmetric to operator new.
void * operator new (size_t size)
 Operator new for memory allocation uses Open CASCADE memory manager.
void * operator new (size_t, void *anAddress)
 Operator new for placement in pre-allocated memory.
void * operator new (size_t size)
 Operator new for memory allocation uses Open CASCADE memory manager.
void * operator new (size_t, void *anAddress)
 Operator new for placement in pre-allocated memory.
Standard_EXPORT Standard_Boolean OwnDeviationAngle (Standard_Real &anAngle, Standard_Real &aPreviousAngle) const
Standard_EXPORT Standard_Boolean OwnDeviationCoefficient (Standard_Real &aCoefficient, Standard_Real &aPreviousCoefficient) const
Standard_EXPORT Standard_Boolean OwnHLRDeviationAngle (Standard_Real &anAngle, Standard_Real &aPreviousAngle) const
Standard_EXPORT Standard_Boolean OwnHLRDeviationCoefficient (Standard_Real &aCoefficient, Standard_Real &aPreviousCoefficient) const
virtual Standard_EXPORT void PolygonOffsets (Standard_Integer &aMode, Standard_Real &aFactor, Standard_Real &aUnits) const
 Retrieves current polygon offsets settings from <myDrawer>.
.
Standard_EXPORT
Handle_Prs3d_Presentation 
Presentation () const
Standard_EXPORT void Redisplay (const Standard_Boolean AllModes=Standard_False)
Standard_EXPORT void ResetLocation ()
Standard_EXPORT const
Handle_SelectMgr_Selection & 
Selection (const Standard_Integer aMode) const
 Returns the selection Selection having the selection mode aMode.
.
Standard_EXPORT Standard_Integer SelectionMode () const
 Returns the selection mode of the interactive object.
.
Standard_Integer SelectionPriority () const
void Set (const TopoDS_Shape &ashap)
 Constructs an instance of the shape object ashape.
.
Standard_EXPORT void SetAngleAndDeviation (const Standard_Real anAngle)
Standard_EXPORT void SetAspect (const Handle(Prs3d_BasicAspect)&anAspect, const Standard_Boolean globalChange=Standard_True)
virtual Standard_EXPORT void SetAttributes (const Handle(AIS_Drawer)&aDrawer)
 Initializes the drawing tool aDrawer.
.
virtual Standard_EXPORT void SetAutoHilight (const Standard_Boolean newAutoHilight)
 Set AutoHilight property to true or false
//! Sets up Transform Persistence Mode for this object
.
virtual Standard_EXPORT void SetColor (const Quantity_Color &aColor)
virtual Standard_EXPORT void SetColor (const Quantity_NameOfColor aColor)
virtual Standard_EXPORT void SetContext (const Handle(AIS_InteractiveContext)&aCtx)
Standard_EXPORT void SetCurrentFacingModel (const Aspect_TypeOfFacingModel aModel=Aspect_TOFM_BOTH_SIDE)
virtual Standard_EXPORT void SetDegenerateModel (const Aspect_TypeOfDegenerateModel aModel=Aspect_TDM_WIREFRAME, const Quantity_Ratio aRatio=0.0)
Standard_EXPORT void SetDisplayMode (const Standard_Integer aMode)
void SetHilightMode (const Standard_Integer anIndex)
Standard_EXPORT void SetHLRAngleAndDeviation (const Standard_Real anAngle)
Standard_EXPORT void SetInfiniteState (const Standard_Boolean aFlag=Standard_True)
virtual Standard_EXPORT void SetLocation (const TopLoc_Location &aLoc)
virtual Standard_EXPORT void SetMaterial (const Graphic3d_MaterialAspect &aName)
virtual Standard_EXPORT void SetMaterial (const Graphic3d_NameOfMaterial aName)
Standard_EXPORT void SetOwnDeviationAngle (const Standard_Real anAngle)
 sets myOwnDeviationAngle field in AIS_Drawer & recomputes presentation

Standard_EXPORT Standard_Boolean SetOwnDeviationAngle ()
 Sets a local value for deviation angle for this specific shape.
.
Standard_EXPORT void SetOwnDeviationCoefficient (const Standard_Real aCoefficient)
 Sets a local value for deviation coefficient for this specific shape.
.
Standard_EXPORT Standard_Boolean SetOwnDeviationCoefficient ()
 Sets a local value for deviation coefficient for this specific shape.
.
void SetOwner (const Handle(Standard_Transient)&ApplicativeEntity)
Standard_EXPORT void SetOwnHLRDeviationAngle (const Standard_Real anAngle)
 sets myOwnHLRDeviationAngle field in AIS_Drawer & recomputes presentation

Standard_EXPORT Standard_Boolean SetOwnHLRDeviationAngle ()
 Sets a local value for HLR deviation angle for this specific shape.
.
Standard_EXPORT void SetOwnHLRDeviationCoefficient (const Standard_Real aCoefficient)
Standard_EXPORT Standard_Boolean SetOwnHLRDeviationCoefficient ()
 Sets a local value for HLR deviation coefficient for this specific shape.
.
virtual Standard_EXPORT void SetPolygonOffsets (const Standard_Integer aMode, const Standard_Real aFactor=1.0, const Standard_Real aUnits=0.0)
Standard_EXPORT void SetSelectionMode (const Standard_Integer aMode)
void SetSelectionPriority (const Standard_Integer aPriority)
virtual Standard_EXPORT void SetTextureFileName (const TCollection_AsciiString &TextureFileName)
Standard_EXPORT void SetTextureMapOff ()
 Disables texture mapping
.
Standard_EXPORT void SetTextureMapOn ()
 Enables texture mapping
.
virtual Standard_EXPORT void SetTextureOrigin (const Standard_Boolean SetTextureOriginYN, const Standard_Real UOrigin=0.0, const Standard_Real VOrigin=0.0)
virtual Standard_EXPORT void SetTextureRepeat (const Standard_Boolean RepeatYN, const Standard_Real URepeat=1.0, const Standard_Real VRepeat=1.0)
virtual Standard_EXPORT void SetTextureScale (const Standard_Boolean SetTextureScaleYN, const Standard_Real ScaleU=1.0, const Standard_Real ScaleV=1.0)
Standard_EXPORT void SetToUpdate ()
 flags all the Presentations to be Updated.

Standard_EXPORT void SetToUpdate (const Standard_Integer aMode)
Standard_EXPORT void SetTransformation (const Handle(Geom_Transformation)&aTranformation, const Standard_Boolean postConcatenate=Standard_False, const Standard_Boolean updateSelection=Standard_True)
Standard_EXPORT void SetTransformPersistence (const Graphic3d_TransModeFlags &aFlag)
 Calls previous method with point (0,0,0)
.
virtual Standard_EXPORT void SetTransformPersistence (const Graphic3d_TransModeFlags &aFlag, const gp_Pnt &APoint)
 Sets up Transform Persistence Mode for this object
.
virtual Standard_EXPORT void SetTransparency (const Standard_Real aValue=0.6)
 Sets the value aValue for transparency in the reconstructed compound shape.
.
Standard_EXPORT void SetTypeOfPresentation (const PrsMgr_TypeOfPresentation3d aType)
virtual Standard_EXPORT void SetWidth (const Standard_Real aValue)
 Sets the value aValue for line width in the reconstructed compound shape.
.
virtual Standard_EXPORT void ShallowDump (Standard_OStream &) const
virtual Standard_EXPORT void ShallowDump (Standard_OStream &) const
const TopoDS_ShapeShape () const
 Returns this shape object.
.
Standard_EXPORT Standard_Boolean ShowTriangles () const
virtual Standard_EXPORT void ShowTriangles (const Standard_Boolean ShowTrianglesYN=Standard_False)
virtual Standard_EXPORT
Standard_Integer 
Signature () const
 Returns index 0. This value refers to SHAPE from TopAbs_ShapeEnum
.
Standard_Integer State () const
void State (const Standard_Integer theState)
Standard_EXPORT Standard_CString TextureFile () const
Standard_EXPORT Standard_Boolean TextureMapState () const
Standard_EXPORT Standard_Boolean TextureModulate () const
Standard_EXPORT Standard_Boolean TextureOrigin () const
Standard_EXPORT Standard_Boolean TextureRepeat () const
Standard_EXPORT Standard_Boolean TextureScale () const
Standard_EXPORT Standard_Real TextureScaleU () const
Standard_EXPORT Standard_Real TextureScaleV () const
Standard_EXPORT Standard_Real TextureUOrigin () const
Standard_EXPORT Standard_Real TextureVOrigin () const
virtual Standard_EXPORT
Handle_Standard_Transient 
This () const
virtual Standard_EXPORT
Handle_Standard_Transient 
This () const
Standard_EXPORT void ToBeUpdated (TColStd_ListOfInteger &ListOfMode) const
 gives the list of modes which are flagged "to be updated".

Standard_EXPORT
Handle_Geom_Transformation 
Transformation ()
virtual Standard_EXPORT
Standard_Real 
Transparency () const
virtual Standard_EXPORT
AIS_KindOfInteractive 
Type () const
 Returns Object as the type of Interactive Object.
.
Standard_EXPORT
PrsMgr_TypeOfPresentation3d 
TypeOfPresentation3d () const
 Returns information on whether the object accepts display in HLR mode or not.
.
virtual Standard_EXPORT void UnsetAttributes ()
 Clears settings provided by the drawing tool aDrawer.
.
virtual Standard_EXPORT void UnsetColor ()
 Removes settings for color in the reconstructed compound shape.
.
void UnsetDisplayMode ()
 Removes display mode settings from the interactive object.
.
void UnsetHilightMode ()
virtual Standard_EXPORT void UnsetMaterial ()
 Removes settings for material in the reconstructed compound shape.
.
void UnsetSelectionMode ()
void UnsetSelectionPriority ()
 Removes the setting for selection priority. SelectionPriority then returns -1.
.
Standard_EXPORT void UnsetTransformation ()
 Deactivate the current transformation
.
virtual Standard_EXPORT void UnsetTransparency ()
 Removes the setting for transparency in the reconstructed compound shape.
.
virtual Standard_EXPORT void UnsetWidth ()
 Removes the setting for line width in the reconstructed compound shape.
.
Standard_EXPORT void UpdateAttributes ()
virtual Standard_EXPORT void UpdateLocation (const Handle(Prs3d_Presentation)&P)
virtual Standard_EXPORT void UpdateLocation ()
 Recomputes the location of the selection aSelection.
.
Standard_EXPORT void UpdateSelection (const Standard_Integer aMode)
Standard_EXPORT void UpdateSelection ()
 re-computes the sensitive primitives for all modes

Standard_EXPORT Standard_Real URepeat () const
Standard_EXPORT Standard_Real UserAngle () const
 gives back the angle initial value put by the User.

const TColStd_ListOfTransient & Users () const
Standard_EXPORT Standard_Real VRepeat () const
Standard_EXPORT Standard_Real Width () const
 Returns the width setting of the Interactive Object.
.

Static Public Member Functions

static Standard_EXPORT
Standard_Real 
GetDeflection (const TopoDS_Shape &aShape, const Handle(Prs3d_Drawer)&aDrawer)
static Standard_EXPORT
Standard_Integer 
SelectionMode (const TopAbs_ShapeEnum aShapeType)
static Standard_EXPORT
TopAbs_ShapeEnum 
SelectionType (const Standard_Integer aDecompositionMode)

Protected Member Functions

virtual Standard_EXPORT void Compute (const Handle(Prs3d_Projector)&aProjector, const Handle(Geom_Transformation)&aTrsf, const Handle(Prs3d_Presentation)&aPresentation)
virtual Standard_EXPORT void Compute (const Handle(Prs3d_Projector)&aProjector, const Handle(Prs3d_Presentation)&aPresentation)
virtual Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager2d)&aPresentationManager, const Handle(Graphic2d_GraphicObject)&aPresentation, const Standard_Integer aMode=0)
virtual Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)&aPresentationManager, const Handle(Prs3d_Presentation)&aPresentation, const Standard_Integer aMode=0)
virtual Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)&aSelection, const Standard_Integer aMode)
virtual Standard_EXPORT void Fill (const Handle(PrsMgr_PresentationManager)&aPresentationManager, const Handle(PrsMgr_Presentation)&aPresentation, const Standard_Integer aMode=0)
 High-level interface for controlling polygon offsets
.
Standard_EXPORT
PrsMgr_Presentations & 
Presentations ()
Standard_EXPORT void Update (const Standard_Integer aMode, const Standard_Boolean ClearOther)
Standard_EXPORT void Update (const Standard_Boolean AllModes=Standard_False)
 recomputes all presentations of the object.

virtual Standard_EXPORT void UpdateLocation (const Handle(SelectMgr_Selection)&aSelection)

Static Protected Member Functions

static Standard_EXPORT void DisplayBox (const Handle(Prs3d_Presentation)&aPrs, const Bnd_Box &aBox, const Handle(Prs3d_Drawer)&aDrawer)

Protected Attributes

Standard_Boolean hasOwnColor
Standard_Boolean hasOwnMaterial
Bnd_Box myBB
Standard_Boolean myCompBB
Aspect_TypeOfFacingModel myCurrentFacingModel
Handle_AIS_Drawer myDrawer
Standard_Integer myHilightMode
Standard_Boolean myInfiniteState
TopLoc_Location myLocation
Quantity_Color myOwnColor
Graphic3d_NameOfMaterial myOwnMaterial
Standard_Real myOwnWidth
PrsMgr_Presentations myPresentations
Standard_Boolean myRecomputeEveryPrs
SelectMgr_SequenceOfSelection myselections
TopoDS_Shape myshape
TColStd_ListOfInteger myToRecomputeModes
Standard_Real myTransparency
PrsMgr_TypeOfPresentation3d myTypeOfPresentation3d

Private Member Functions

Standard_EXPORT Standard_Boolean TriangleIsValid (const gp_Pnt &P1, const gp_Pnt &P2, const gp_Pnt &P3) const

Private Attributes

Standard_Boolean DoMapTexture
Standard_Boolean DoRepeat
Standard_Boolean DoSetTextureOrigin
Standard_Boolean DoSetTextureScale
Standard_Boolean DoShowTriangles
Standard_Real dUmax
Standard_Real dVmax
Handle_Graphic3d_AspectFillArea3d myAspect
Standard_Real myDeflection
Standard_Boolean myModulate
Graphic3d_NameOfTexture2D myPredefTexture
Standard_Real myScaleU
Standard_Real myScaleV
Handle_Graphic3d_Texture2Dmanual mytexture
TCollection_AsciiString myTextureFile
Standard_Real myUOrigin
Standard_Real myURepeat
Standard_Real myVOrigin
Standard_Real myVRepeat
Standard_Real Umax
Standard_Real Umin
Standard_Real Vmax
Standard_Real Vmin

Friends

class AIS_InteractiveContext
Standard_EXPORT void PrsMgr_Presentation3d::Compute (const Handle(Graphic3d_DataStructureManager)&aProjector, const Handle(Geom_Transformation)&TheTrsf, const Handle(Graphic3d_Structure)&aGivenStruct)
Standard_EXPORT
Handle_Graphic3d_Structure 
PrsMgr_Presentation3d::Compute (const Handle(Graphic3d_DataStructureManager)&aProjector, const Handle(Geom_Transformation)&TheTrsf)
Standard_EXPORT void PrsMgr_Presentation3d::Compute (const Handle(Graphic3d_DataStructureManager)&aProjector, const Handle(Graphic3d_Structure)&aGivenStruct)
Standard_EXPORT
Handle_Graphic3d_Structure 
PrsMgr_Presentation3d::Compute (const Handle(Graphic3d_DataStructureManager)&aProjector)
class PrsMgr_PresentationManager
class SelectMgr_SelectionManager

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index