Class IGeoObjectImpl
This class helps to implement IGeoObject by implementing some IGeoObject methods
in a default way and by offering some helper methods.
Inheritance
System.Object
IGeoObjectImpl
Implements
System.IComparable
System.Runtime.Serialization.ISerializable
System.ICloneable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: CADability.dll
Syntax
public abstract class IGeoObjectImpl : IGeoObject, ILayer, IStyle, IOctTreeInsertable, IComparable, ISerializable, IFeedBack, ICloneable
Constructors
|
Improve this Doc
View Source
IGeoObjectImpl()
Constructor that initializes some members. Must always be called
Declaration
protected IGeoObjectImpl()
|
Improve this Doc
View Source
IGeoObjectImpl(SerializationInfo, StreamingContext)
Constructor required by deserialization
Declaration
protected IGeoObjectImpl(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
SerializationInfo
|
| System.Runtime.Serialization.StreamingContext |
context |
StreamingContext
|
|
Improve this Doc
View Source
IGeoObjectImpl(StreamingContext)
Declaration
protected IGeoObjectImpl(StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.StreamingContext |
context |
|
Fields
|
Improve this Doc
View Source
isChanging
Declaration
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
isModifyingWithMouse
Declaration
protected bool isModifyingWithMouse
Field Value
| Type |
Description |
| System.Boolean |
|
Properties
|
Improve this Doc
View Source
Actuator
Sets or gets the drive assiziated with this GeoObject
Declaration
public virtual IDrive Actuator { get; set; }
Property Value
|
Improve this Doc
View Source
Attributes
Implements Attributes. Returns a collection af all CADability attributes
used by this GeoObject. Non CADability attributes must be handled by your code.
Declaration
public INamedAttribute[] Attributes { get; }
Property Value
|
Improve this Doc
View Source
CustomAttributeKeys
Declaration
public virtual string[] CustomAttributeKeys { get; }
Property Value
| Type |
Description |
| System.String[] |
|
|
Improve this Doc
View Source
Description
Returns a textual description of the GeoObject. Mainly used for debugging purposes
Declaration
public virtual string Description { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
IsVisible
Reads or writes the visible flag. Invisible objects ar not displayed.
Declaration
public virtual bool IsVisible { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Layer
Declaration
public virtual Layer Layer { get; set; }
Property Value
|
Improve this Doc
View Source
NumChildren
Overrides NumChildren. The default implementation returns 0.
Declaration
public virtual int NumChildren { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
OwnedItems
Returns an array of objects owned by this object. E.g. a face is owned by a shell.
Declaration
public virtual IGeoObject[] OwnedItems { get; }
Property Value
|
Improve this Doc
View Source
Owner
Overrides Owner. Fully implements set and get property
and saves the value in a private member.
Declaration
public virtual IGeoObjectOwner Owner { get; set; }
Property Value
|
Improve this Doc
View Source
PreferredStyle
Declaration
public virtual Style.EDefaultFor PreferredStyle { get; }
Property Value
|
Improve this Doc
View Source
Style
Declaration
public virtual Style Style { get; set; }
Property Value
|
Improve this Doc
View Source
StyleIsValid
Returns true, if the setting of the style of this object is identical to the
setting of the individual attributes, false otherwise
Declaration
public bool StyleIsValid { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
UniqueId
Declaration
public int UniqueId { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
UserData
Fully implements UserData. No need to override.
Declaration
public virtual UserData UserData { get; }
Property Value
Methods
|
Improve this Doc
View Source
AttributeChanged(INamedAttribute)
Declaration
public virtual bool AttributeChanged(INamedAttribute attribute)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ChangingUserData(IGeoObject, String, Object)
Declaration
public static IDisposable ChangingUserData(IGeoObject involved, string key, object oldValue)
Parameters
| Type |
Name |
Description |
| IGeoObject |
involved |
|
| System.String |
key |
|
| System.Object |
oldValue |
|
Returns
| Type |
Description |
| System.IDisposable |
|
|
Improve this Doc
View Source
ChangingUserData(IGeoObject, String, Object, Boolean)
Declaration
public static IDisposable ChangingUserData(IGeoObject involved, string key, object oldValue, bool onlyAttribute)
Parameters
| Type |
Name |
Description |
| IGeoObject |
involved |
|
| System.String |
key |
|
| System.Object |
oldValue |
|
| System.Boolean |
onlyAttribute |
|
Returns
| Type |
Description |
| System.IDisposable |
|
|
Improve this Doc
View Source
Child(Int32)
Declaration
public virtual IGeoObject Child(int Index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
Index |
|
Returns
|
Improve this Doc
View Source
Clone()
Overrides Clone(). Must be implemented by each GeoObject. No default implementation.
Declaration
public abstract IGeoObject Clone()
Returns
|
Improve this Doc
View Source
CopyAttributes(IGeoObject)
Implements CopyAttributes(IGeoObject). The default implementation handles
all CADability attributes and leaves the handling of non CADability attributes to your code.
Declaration
public virtual void CopyAttributes(IGeoObject ToCopyFrom)
Parameters
| Type |
Name |
Description |
| IGeoObject |
ToCopyFrom |
GeoObject to copy attribute data from
|
|
Improve this Doc
View Source
CopyGeometry(IGeoObject)
Declaration
public abstract void CopyGeometry(IGeoObject ToCopyFrom)
Parameters
| Type |
Name |
Description |
| IGeoObject |
ToCopyFrom |
GeoObject to copy geometrical data from
|
|
Improve this Doc
View Source
Decompose()
Decomposes this GeoObject into simpler GeoObjects. May return null if there are no simpler objects.
Declaration
public virtual GeoObjectList Decompose()
Returns
|
Improve this Doc
View Source
FindSnapPoint(SnapPointFinder)
Declaration
public virtual void FindSnapPoint(SnapPointFinder spf)
Parameters
|
Improve this Doc
View Source
FireDidChange(GeoObjectChange)
Declaration
protected void FireDidChange(GeoObjectChange Change)
Parameters
|
Improve this Doc
View Source
FireWillChange(GeoObjectChange)
Declaration
protected void FireWillChange(GeoObjectChange Change)
Parameters
| Type |
Name |
Description |
| GeoObjectChange |
Change |
type of chage that is about to happen
|
|
Improve this Doc
View Source
GetAttributeProperties(IFrame)
Declaration
public virtual IShowProperty[] GetAttributeProperties(IFrame Frame)
Parameters
| Type |
Name |
Description |
| IFrame |
Frame |
the frame of the view
|
Returns
|
Improve this Doc
View Source
GetBoundingCube()
Declaration
public abstract BoundingCube GetBoundingCube()
Returns
|
Improve this Doc
View Source
GetExtent(IGeoObject, Projection, Boolean)
Returns the bounding rectangle of the GeoObject with respect to a specified projection
Declaration
public static BoundingRect GetExtent(IGeoObject go, Projection projection, bool regardLineWidth)
Parameters
| Type |
Name |
Description |
| IGeoObject |
go |
the GeoObject
|
| Projection |
projection |
the projection
|
| System.Boolean |
regardLineWidth |
regard line with
|
Returns
|
Improve this Doc
View Source
GetExtent(Projection, ExtentPrecision)
Returns the 2 dimensional extent of objects for a specific projection.
Declaration
public abstract BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
Parameters
| Type |
Name |
Description |
| Projection |
projection |
The projection for which the extent is beeing queried
|
| ExtentPrecision |
extentPrecision |
Raw or exact extent
|
Returns
|
Improve this Doc
View Source
GetExtent(Double)
Declaration
public abstract BoundingCube GetExtent(double precision)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
|
Returns
|
Improve this Doc
View Source
GetNamedAttribute(String)
Implements GetNamedAttribute(String). The default implementation handles
all CADability attributes and leaves the handling of non CADability attributes to your code.
Declaration
public virtual INamedAttribute GetNamedAttribute(string key)
Parameters
| Type |
Name |
Description |
| System.String |
key |
key or typename of attribute to set
|
Returns
|
Improve this Doc
View Source
GetObjectData(SerializationInfo, StreamingContext)
Implements ISerializable.GetObjectData. Saves UserData, Layer and Style.
All other properties of the GeoObject must be saved by the derived class. don't forget
to call the base implementation
Declaration
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
info
|
| System.Runtime.Serialization.StreamingContext |
context |
context
|
|
Improve this Doc
View Source
GetQuadTreeItem(Projection, ExtentPrecision)
Declaration
public abstract IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
Parameters
Returns
|
Improve this Doc
View Source
GetShowProperties(IFrame)
Should be overridden and return a IShowProperty derived object
that handles the display and modification of the properties of the IGeoObject derived object.
Default implementation return null.
Declaration
public virtual IShowProperty GetShowProperties(IFrame Frame)
Parameters
| Type |
Name |
Description |
| IFrame |
Frame |
|
Returns
|
Improve this Doc
View Source
HasChildren()
Overrides HasChildren(). The deafult implementation returns false.
Declaration
public virtual bool HasChildren()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
HasValidData()
Default implementation of IGeoObject.HasValidData. Returns true.
Override if the derived object can decide itself.
Declaration
public virtual bool HasValidData()
Returns
| Type |
Description |
| System.Boolean |
true
|
|
Improve this Doc
View Source
HitTest(ref BoundingCube, Double)
Declaration
public abstract bool HitTest(ref BoundingCube cube, double precision)
Parameters
| Type |
Name |
Description |
| BoundingCube |
cube |
|
| System.Double |
precision |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
HitTest(Projection, BoundingRect, Boolean)
Declaration
public abstract bool HitTest(Projection projection, BoundingRect rect, bool onlyInside)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
HitTest(Projection.PickArea, Boolean)
Declaration
public abstract bool HitTest(Projection.PickArea area, bool onlyInside)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsAttributeUsed(Object)
/// Overrides IsAttributeUsed(Object). The default implementation recursively
calls IsAttributeUsed for all children (if any) and then checks the usage for all
attributes implemented by CADability. No checks are performed for non CADability
attributes. So you can override this method to handle your own attributes and call
the base implementation for CADability attributes.
Declaration
public virtual bool IsAttributeUsed(object attribute)
Parameters
| Type |
Name |
Description |
| System.Object |
attribute |
attribut to check
|
Returns
| Type |
Description |
| System.Boolean |
true if used by this GeoObject
|
|
Improve this Doc
View Source
IsOwnedByBlockRef(IGeoObject)
Checks whether the GeoObject is owned by a BlockRef object.
Declaration
public static bool IsOwnedByBlockRef(IGeoObject toTest)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
JsonGetObjectData(IJsonWriteData)
Declaration
protected void JsonGetObjectData(IJsonWriteData data)
Parameters
|
Improve this Doc
View Source
JsonSerializationDone()
Declaration
protected void JsonSerializationDone()
|
Improve this Doc
View Source
JsonSetObjectData(IJsonReadData)
Declaration
protected void JsonSetObjectData(IJsonReadData data)
Parameters
|
Improve this Doc
View Source
MakeChange(IGeoObjectImpl, String)
Declaration
public static IDisposable MakeChange(IGeoObjectImpl geoObject, string propertyName)
Parameters
| Type |
Name |
Description |
| IGeoObjectImpl |
geoObject |
|
| System.String |
propertyName |
|
Returns
| Type |
Description |
| System.IDisposable |
|
|
Improve this Doc
View Source
Modify(ModOp)
Overrides Modify(ModOp). Must be implemented by each GeoObject.
No default implementation.
Declaration
public abstract void Modify(ModOp m)
Parameters
| Type |
Name |
Description |
| ModOp |
m |
the modification
|
|
Improve this Doc
View Source
ModifyInverse(ModOp)
Modify with the inverse modification. Calls Modify(m.GetInverse());
Declaration
public virtual void ModifyInverse(ModOp m)
Parameters
| Type |
Name |
Description |
| ModOp |
m |
|
|
Improve this Doc
View Source
ModifyWithMouse(Object, String, Boolean)
Declaration
public virtual bool ModifyWithMouse(object sender, string propertyName, bool startModify)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
| System.String |
propertyName |
|
| System.Boolean |
startModify |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
PaintTo3D(IPaintTo3D)
Declaration
public abstract void PaintTo3D(IPaintTo3D paintTo3D)
Parameters
| Type |
Name |
Description |
| IPaintTo3D |
paintTo3D |
Target for the paint operation
|
|
Improve this Doc
View Source
PaintTo3DList(IPaintTo3D, ICategorizedDislayLists)
Declaration
public virtual void PaintTo3DList(IPaintTo3D paintTo3D, ICategorizedDislayLists lists)
Parameters
|
Improve this Doc
View Source
Position(GeoPoint, GeoVector, Double)
Declaration
public abstract double Position(GeoPoint fromHere, GeoVector direction, double precision)
Parameters
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
PrePaintTo3D(IPaintTo3D)
Hier kann man Dinge vor OpenList tun (da sie selbst vielleicht ein OpenList benötigen)
Declaration
public virtual void PrePaintTo3D(IPaintTo3D paintTo3D)
Parameters
|
Improve this Doc
View Source
PrepareDisplayList(Double)
Called before PaintTo3D(IPaintTo3D) is called, should implement the time consuming work for the display (like calculationg the triangulation
of Faces or Polylines of Curves). Not normally used by user code.
Declaration
public abstract void PrepareDisplayList(double precision)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
Required precision
|
|
Improve this Doc
View Source
PropagateAttributes(Layer, ColorDef)
Sets the provided layer and color to this object and propagates these attributes to the owned objects.
Declaration
public virtual void PropagateAttributes(Layer layer, ColorDef colorDef)
Parameters
| Type |
Name |
Description |
| Layer |
layer |
Layer to set
|
| ColorDef |
colorDef |
Color to set
|
|
Improve this Doc
View Source
SetColorDef(ref ColorDef, ColorDef)
Hilfsfunktion zum Setzen der Farbe und gleichzeitig die Events feuern
Declaration
protected void SetColorDef(ref ColorDef color, ColorDef c)
Parameters
| Type |
Name |
Description |
| ColorDef |
color |
Referenz auf die i.a. private Membervariable
|
| ColorDef |
c |
der neue Farbwert
|
|
Improve this Doc
View Source
SetNamedAttribute(String, INamedAttribute)
Declaration
public void SetNamedAttribute(string key, INamedAttribute toSet)
Parameters
| Type |
Name |
Description |
| System.String |
key |
key or typename of attribute to set
|
| INamedAttribute |
toSet |
attribute
|
|
Improve this Doc
View Source
SetSerializationValue(String, Object)
Declaration
protected void SetSerializationValue(string Name, object Value)
Parameters
| Type |
Name |
Description |
| System.String |
Name |
|
| System.Object |
Value |
|
|
Improve this Doc
View Source
UpdateAttributes(IAttributeListContainer)
Declaration
public virtual void UpdateAttributes(IAttributeListContainer alc)
Parameters
Events
|
Improve this Doc
View Source
DidChangeEvent
Event that is raised when the GeoObject did change.
Declaration
public event ChangeDelegate DidChangeEvent
Event Type
|
Improve this Doc
View Source
FeedBackChangedEvent
Declaration
public event FeedBackChangedDelegate FeedBackChangedEvent
Event Type
|
Improve this Doc
View Source
Declaration
public static event IGeoObjectImpl.GetAdditionalContextMenueDelegate GetAdditionalContextMenueEvent
Event Type
|
Improve this Doc
View Source
WillChangeEvent
Event that is raised when the GeoObject is about to change.
Declaration
public event ChangeDelegate WillChangeEvent
Event Type
Explicit Interface Implementations
|
Improve this Doc
View Source
IFeedBack.GetExtent()
Declaration
BoundingCube IFeedBack.GetExtent()
Returns
|
Improve this Doc
View Source
ICloneable.Clone()
Declaration
object ICloneable.Clone()
Returns
| Type |
Description |
| System.Object |
|
|
Improve this Doc
View Source
IComparable.CompareTo(Object)
Declaration
int IComparable.CompareTo(object obj)
Parameters
| Type |
Name |
Description |
| System.Object |
obj |
|
Returns
| Type |
Description |
| System.Int32 |
|
Implements
System.IComparable
System.Runtime.Serialization.ISerializable
System.ICloneable