Raw version of hierarchy.md #64
12
README.md
12
README.md
@ -17,6 +17,11 @@
|
|||||||
* [visionforge-core](#visionforge-core)
|
* [visionforge-core](#visionforge-core)
|
||||||
* [visionforge-solid](#visionforge-solid)
|
* [visionforge-solid](#visionforge-solid)
|
||||||
* [visionforge-gdml](#visionforge-gdml)
|
* [visionforge-gdml](#visionforge-gdml)
|
||||||
|
* [visionforge-fx](#visionforge-fx)
|
||||||
|
* [visionforge-markdown](#visionforge-markdown)
|
||||||
|
* [visionforge-plotly](#visionforge-plotly)
|
||||||
|
* [visionforge-server](#visionforge-server)
|
||||||
|
* [visionforge-threejs](#visionforge-threejs)
|
||||||
* [Visualization for External Systems](#visualization-for-external-systems)
|
* [Visualization for External Systems](#visualization-for-external-systems)
|
||||||
* [Demonstrations](#demonstrations)
|
* [Demonstrations](#demonstrations)
|
||||||
* [Simple Example - Solid Showcase](#simple-example---solid-showcase)
|
* [Simple Example - Solid Showcase](#simple-example---solid-showcase)
|
||||||
@ -65,6 +70,13 @@ To learn more about DataForge, please consult the following URLs:
|
|||||||
## Modules contained in this repository
|
## Modules contained in this repository
|
||||||
|
|
||||||
### visionforge-core
|
### visionforge-core
|
||||||
|
> Core classes, algebra definitions, basic linear algebra
|
||||||
|
>
|
||||||
|
> **Maturity**: DEVELOPMENT
|
||||||
|
>
|
||||||
|
> **Features:**
|
||||||
|
> - [vision](visionforge-core/src/commonMain/kotlin/space/kscience/visionforge/Vision.kt) : an architecture of visions.
|
||||||
|
<hr/>
|
||||||
|
|
||||||
Contains a general hierarchy of classes and interfaces useful for visualization.
|
Contains a general hierarchy of classes and interfaces useful for visualization.
|
||||||
This module is not specific to 3D-visualization.
|
This module is not specific to 3D-visualization.
|
||||||
|
@ -3,14 +3,19 @@
|
|||||||
![](../docs/images/hierarchy.png)
|
![](../docs/images/hierarchy.png)
|
||||||
|
|
||||||
### Vision
|
### Vision
|
||||||
|
* function `getPropertyValue(name: Name, inherit: Boolean = false, includeStyles: Boolean = true, includeDefaults: Boolean = true)` - get property value with given layer flags.
|
||||||
|
|
||||||
* function `getProperty(name: Name, inherit: Boolean, includeStyles: Boolean, includeDefaults: Boolean)`.
|
* function `setProperty(name: Name, item: Any?)` - a convenient method to set property node or value. If `item` is null, then node is removed, not a value
|
||||||
|
Sets the `item` property to the element with the `name` identification.
|
||||||
|
|
||||||
It gets properties of element with `name` identification.
|
### SolidGroup
|
||||||
`inherit` — toggles parent node property lookup. Null means inference from descriptor. Default is false.
|
|
||||||
`includeStyles` — toggles inclusion of. Null means inference from descriptor. Default is true.
|
|
||||||
`includeDefaults` — default is false.
|
|
||||||
|
|
||||||
* function `setProperty(name: Name, item: MetaItem?, notify: Boolean = true)`
|
* function `getPrototype(name: Name)` - get a prototype redirecting the request to the parent if prototype is not found. If prototype is a ref, then it is unfolded automatically.
|
||||||
|
|
||||||
Sets the `item` property to the element with the `name` identification. `notify` is a value which toggles the necessity of the change notification. Default is true.
|
* function `prototypes(builder: VisionContainerBuilder<Solid>.() -> Unit)` - create or edit prototype node as a group.
|
||||||
|
|
||||||
|
### RootVisionGroup
|
||||||
|
|
||||||
|
Non-serializable root group used to propagate manager to its children.
|
||||||
|
|
||||||
|
* function Vision.root(manager: VisionManager) - designate this [VisionGroup] as a root group and assign a [VisionManager] as its parent.
|
||||||
|
@ -3,41 +3,50 @@
|
|||||||
|
|
||||||
interface Vision{
|
interface Vision{
|
||||||
val parent: VisionGroup?
|
val parent: VisionGroup?
|
||||||
fun getProperty(name):TypedMetaItem?
|
fun getPropertyValue(name,inherit,includeStyles,includeDefaults): Value?
|
||||||
fun setProperty(name, item)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Solid{
|
interface Solid{
|
||||||
base of 3D geometries
|
val descriptor: MetaDescriptor
|
||||||
|
val parent: VisionGroup?
|
||||||
}
|
}
|
||||||
Vision <- Solid
|
Vision <-- Solid
|
||||||
|
|
||||||
class VisionGroup{
|
class VisionGroup{
|
||||||
a group of visions
|
val children: Map<NameToken, Vision>
|
||||||
|
val defaultTarget: String
|
||||||
|
fun content(target): Map<Name, Any>
|
||||||
|
fun get(name: Name): Vision?
|
||||||
}
|
}
|
||||||
|
|
||||||
Vision <-- VisionGroup
|
Vision <-- VisionGroup
|
||||||
|
|
||||||
class VisionBase{
|
class VisionBase{
|
||||||
basic vision
|
var parent: VisionGroup?
|
||||||
implementation
|
var properties: MutableMeta?
|
||||||
|
fun getOrCreateProperties(): MutableMeta
|
||||||
}
|
}
|
||||||
Vision <- VisionBase
|
Vision <-- VisionBase
|
||||||
|
|
||||||
|
|
||||||
class SolidLabel
|
class SolidLabel
|
||||||
Solid <--- SolidLabel
|
Solid <--- SolidLabel
|
||||||
|
|
||||||
class SolidGroup
|
class SolidGroup{
|
||||||
Solid <--- SolidGroup
|
var properties: MutableMeta?
|
||||||
MutableVisionGroup <-- SolidGroup
|
val children: Map<NameToken, Vision>
|
||||||
|
var prototypes: MutableVisionGroup?
|
||||||
|
|
||||||
|
fun getPrototype(name): Solid?
|
||||||
|
fun prototypes(builder)
|
||||||
|
}
|
||||||
|
Solid <--- SolidGroup
|
||||||
|
VisionGroupBase <-- SolidGroup
|
||||||
|
|
||||||
class SphereLayer
|
class SphereLayer
|
||||||
GeometrySolid <-- SphereLayer
|
Solid <-- SphereLayer
|
||||||
|
|
||||||
class Sphere
|
class Sphere
|
||||||
GeometrySolid <-- Sphere
|
Solid <-- Sphere
|
||||||
|
|
||||||
class Box
|
class Box
|
||||||
Hexagon <-- Box
|
Hexagon <-- Box
|
||||||
@ -46,24 +55,21 @@ class GenericHexagon
|
|||||||
Hexagon <-- GenericHexagon
|
Hexagon <-- GenericHexagon
|
||||||
|
|
||||||
class Extruded
|
class Extruded
|
||||||
GeometrySolid <-- Extruded
|
Solid <-- Extruded
|
||||||
|
|
||||||
|
|
||||||
class PolyLine
|
class PolyLine
|
||||||
Solid <--- PolyLine
|
Solid <--- PolyLine
|
||||||
|
|
||||||
interface GeometrySolid
|
|
||||||
Solid <--- GeometrySolid
|
|
||||||
|
|
||||||
|
|
||||||
interface Hexagon
|
interface Hexagon
|
||||||
GeometrySolid <-- Hexagon
|
Solid <-- Hexagon
|
||||||
|
|
||||||
class ConeSegment
|
class ConeSegment
|
||||||
GeometrySolid <-- ConeSegment
|
Solid <-- ConeSegment
|
||||||
|
|
||||||
class ConeSurface
|
class ConeSurface
|
||||||
GeometrySolid <-- ConeSurface
|
Solid <-- ConeSurface
|
||||||
|
|
||||||
|
|
||||||
class Convex
|
class Convex
|
||||||
@ -73,29 +79,47 @@ class Composite
|
|||||||
Solid <--- Composite
|
Solid <--- Composite
|
||||||
|
|
||||||
|
|
||||||
interface SolidReference
|
interface SolidReference{
|
||||||
|
val prototype: Solid
|
||||||
|
fun getPropertyValue(name,inherit,includeStyles,includeDefaults): Value?
|
||||||
|
}
|
||||||
VisionGroup <---- SolidReference
|
VisionGroup <---- SolidReference
|
||||||
|
|
||||||
interface MutableVisionGroup
|
class SolidReferenceGroup{
|
||||||
|
val refName: Name
|
||||||
|
var properties: MutableMeta?
|
||||||
|
val prototype: Solid
|
||||||
|
val children: Map<NameToken, Vision>
|
||||||
|
fun getPropertyValue(name,inherit,includeStyles,includeDefaults): Value?
|
||||||
|
}
|
||||||
|
VisionBase <-- SolidReferenceGroup
|
||||||
|
|
||||||
|
interface MutableVisionGroup{
|
||||||
|
fun onStructureChanged(owner, block)
|
||||||
|
fun removeStructureListener(owner)
|
||||||
|
}
|
||||||
VisionGroup <---- MutableVisionGroup
|
VisionGroup <---- MutableVisionGroup
|
||||||
|
|
||||||
class SolidReferenceGroup
|
class VisionGroupBase{
|
||||||
VisionGroup <-- SolidReferenceGroup
|
val children: Map<NameToken, Vision>
|
||||||
Solid <-- SolidReferenceGroup
|
fun set(name: Name?, child: Vision?)
|
||||||
VisionBase <-- SolidReferenceGroup
|
}
|
||||||
SolidReference <-- SolidReferenceGroup
|
VisionBase <-- VisionGroupBase
|
||||||
|
MutableVisionGroup <-- VisionGroupBase
|
||||||
class ReferenceChild
|
|
||||||
VisionGroup <-- ReferenceChild
|
|
||||||
Solid <-- ReferenceChild
|
|
||||||
SolidReference <-- ReferenceChild
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RootVisionGroup
|
class RootVisionGroup
|
||||||
MutableVisionGroup <-- RootVisionGroup
|
VisionGroupBase <-- RootVisionGroup
|
||||||
|
|
||||||
|
|
||||||
class VisionOfPlotly
|
class VisionOfPlotly{
|
||||||
|
var properties: MutableMeta?
|
||||||
|
val plot: Plot
|
||||||
|
}
|
||||||
VisionBase <-- VisionOfPlotly
|
VisionBase <-- VisionOfPlotly
|
||||||
|
|
||||||
|
class VisionOfMarkup{
|
||||||
|
val format: String
|
||||||
|
var content: String?
|
||||||
|
}
|
||||||
|
VisionBase <-- VisionOfMarkup
|
||||||
@enduml
|
@enduml
|
@ -109,7 +109,7 @@ public fun Vision.getPropertyValue(
|
|||||||
): Value? = getPropertyValue(Name.parse(key), inherit, includeStyles, includeDefaults)
|
): Value? = getPropertyValue(Name.parse(key), inherit, includeStyles, includeDefaults)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A convenience method to set property node or value. If Item is null, then node is removed, not a value
|
* A convenient method to set property node or value. If Item is null, then node is removed, not a value
|
||||||
*/
|
*/
|
||||||
public fun Vision.setProperty(name: Name, item: Any?) {
|
public fun Vision.setProperty(name: Name, item: Any?) {
|
||||||
when (item) {
|
when (item) {
|
||||||
|
@ -26,7 +26,7 @@ public interface PrototypeHolder {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents 3-dimensional Visual Group
|
* Represents 3-dimensional Visual Group
|
||||||
* @param prototypes A container for templates visible inside this group
|
* @param prototypes is a container for templates visible inside this group
|
||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
@SerialName("group.solid")
|
@SerialName("group.solid")
|
||||||
|
Loading…
Reference in New Issue
Block a user