java.lang.Object
de.grogra.graph.impl.Edge
de.grogra.graph.impl.Node
de.grogra.imp3d.objects.Null
de.grogra.imp3d.objects.LightNode
de.grogra.imp3d.objects.Sun
de.grogra.gpuflux.imp3d.objects.SpectralSun
- All Implemented Interfaces:
Transformation,Pickable,Renderable,Manageable,PersistenceCapable,Shareable,UserFields,XObject,Map,Serializable
A
Sun node with a user-defined spectral power distribution (SPD).
The SPD is applied by wrapping the internal DirectionalLight in a
SpectralLight before it is installed. The powerDensity field
inherited from Sun continues to control the total irradiance
[W m⁻²]; the SPD shape is given by the supplied SpectralCurve.
The default SPD is a blackbody at 5778 K, which is the standard physical approximation of the solar photosphere spectrum.
Usage example in RGG:
SpectralSun sun = new SpectralSun(52f, 170, 12, 0, 15f, 1500f); // default is already blackbody 5778 K; override if needed: sun.setSpectrum(new BlackbodySpectralCurve(6000f));
- Author:
- MH at YNL 2026
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.graph.impl.Node
Node.AccessorBridge, Node.FieldAttributeAccessor, Node.NType -
Field Summary
FieldsFields inherited from class de.grogra.imp3d.objects.Sun
colour, dayOfYear, dayOfYear$FIELD, distance, distance$FIELD, hourOfDay, hourOfDay$FIELD, latitude, latitude$FIELD, minuteOfHour, minuteOfHour$FIELD, powerDensity, powerDensity$FIELDFields inherited from class de.grogra.imp3d.objects.LightNode
light, light$FIELDFields inherited from class de.grogra.imp3d.objects.Null
transform, transform$FIELD, TRANSFORMING_MASK, transforming$FIELD, USED_BITSFields inherited from class de.grogra.graph.impl.Node
ADDITIONAL_FIELDS, bits, DELETED, EXPLICIT_EXTENT_INDEX, explicitExtentIndex$FIELD, EXTENT_BIT, EXTENT_MASK, extentIndex$FIELD, extentTail$FIELD, HAS_OBSERVERS, IMPORT_NODE_EXTENT_INDEX, IS_INTERPRETIVE, isInterpretive$FIELD, LAST_EXTENT_INDEX, LAST_VISIBLE_EXTENT_INDEX, layer$FIELD, MARK, mark$FIELD, MAX_RESOLUTION, MIME_TYPE, MIN_RESOLUTION, MIN_UNUSED_SPECIAL_OF_SOURCE, MIN_UNUSED_SPECIAL_OF_TARGET, name$FIELD, RESOLUTION_BIT, RESOLUTION_MASK, resolution$FIELD, TYPE_EXTENT_INDEXFields inherited from interface de.grogra.util.Map
DEFAULT_VALUE, EMPTY_MAP -
Constructor Summary
ConstructorsConstructorDescriptionCreates a spectral sun node with default parameters (blackbody 5778 K SPD).SpectralSun(float latitude, int dayOfYear, int hourOfDay, int minuteOfHour, float distance, float powerDensity) -
Method Summary
Modifier and TypeMethodDescriptionprotected Node.NTypeThis method returns theNode.NTypewhich describes the managed fields of the class of this node.protected NodeThis method returns a new instance of the class of this node.voidsetSpectrum(SpectralLightMap value) voidsetSpectrum(SPDIF spd) sets the spectral distributionvoidsetSpectrum(SpectralCurve curve) sets the spectral distributionprotected LightHook for subclasses to wrap theDirectionalLightbefore it is installed viaLightNode.setLight(de.grogra.imp3d.shading.Light).Methods inherited from class de.grogra.imp3d.objects.Sun
applyTransform, calcPos, getColour, getDayLength, getDayOfYear, getDistance, getHourOfDay, getLatitude, getMinuteOfHour, getPowerDensity, setColour, setColour, setDayOfYear, setDistance, setHourOfDay, setLatitude, setMinuteOfHour, setPowerDensity, update, updateMethods inherited from class de.grogra.imp3d.objects.Null
getLocalTransformation, getTransform, getTransformMatrix, getTranslation, isTransforming, postTransform, preTransform, setRotation, setScale, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransforming, setTranslationMethods inherited from class de.grogra.graph.impl.Node
addEdgeBitsTo, addReference, appendBranchNode, appendBranchNode, appendReferencesTo, clone, clone, cloneGraph, dump, dumpTree, dup, dup, dupFrom, dupnew, dupUnmanagedFields, edgeChanged, fieldModified, findAdjacent, findRefinementType, get, getAccessor, getAccessor, getAttributes, getAxisParent, getBoolean, getBranch, getBranchLength, getBranchNode, getBranchTail, getByte, getChar, getCommonAncestor, getCurrentGraphState, getDirectChildCount, getDouble, getEdgeAttributeAccessor, getEdgeAttributes, getEdgeBitsTo, getEdgeTo, getExtentIndex, getFirst, getFirstEdge, getFloat, getGraph, getId, getIgnored, getIndex, getInstantiator, getInt, getLayer, getLong, getManageableType, getName, getNeighbor, getNext, getNType, getObject, getOrCreateEdgeTo, getOrNull, getPersistenceManager, getPredecessor, getProvider, getResolution, getShort, getSource, getStamp, getSuccessor, getSymbol, getSymbolColor, getTarget, getTransaction, getUserField, getUserFieldCount, getXClass, getXData, hasName, initProvider, initXClass, insertBranchNode, insertBranchNode, instantiateGraph, isAncestorOf, isDirection, isEncoarseOf, isExplicitExtentIndex, isManagingInstance, isMarked, isRoot, isSource, isTarget, manageableReadResolve, manageableWriteReplace, paramString, removeAll, removeEdgeBitsTo, removeFromChain, removeFromChain, removeReference, setBranch, setBranch, setExplicitExtentIndex, setExtentIndex, setGraphForDeserialization, setIgnored, setLayer, setMark, setName, setResolution, setSuccessor, setSuccessor, specialEdgeAdded, specialEdgeRefModified, specialEdgeRemoved, toString, writeReplaceMethods inherited from class de.grogra.graph.impl.Edge
addEdgeBits, getBitMark, getEdgeBits, getEdgeKeys, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBitsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.persistence.PersistenceCapable
getBitMark, getObjectMark, setBitMark, setObjectMark
-
Field Details
-
$TYPE
-
spectrum$FIELD
-
-
Constructor Details
-
SpectralSun
public SpectralSun()Creates a spectral sun node with default parameters (blackbody 5778 K SPD). -
SpectralSun
public SpectralSun(float latitude, int dayOfYear, int hourOfDay, int minuteOfHour, float distance, float powerDensity) - Parameters:
latitude- geographic latitude [degrees]dayOfYear- day of year [1..365]hourOfDay- hour [0..23]minuteOfHour- minute [0..59]distance- distance of light node from origin [m]powerDensity- irradiance [W m⁻²]
-
-
Method Details
-
wrapLight
Description copied from class:SunHook for subclasses to wrap theDirectionalLightbefore it is installed viaLightNode.setLight(de.grogra.imp3d.shading.Light). The default returnsdlunchanged; override in e.g.SpectralSun(GPUFlux module) to return aSpectralLightwith a custom SPD. -
setSpectrum
sets the spectral distribution- Parameters:
curve- is the spectral distribution
-
setSpectrum
sets the spectral distribution- Parameters:
curve- is the spectral distribution
-
getNTypeImpl
Description copied from class:NodeThis method returns theNode.NTypewhich describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.- Overrides:
getNTypeImplin classSun- Returns:
- type describing the managed fields of the class of this node
-
newInstance
Description copied from class:NodeThis method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.- Overrides:
newInstancein classSun- Returns:
- new instance of class of this node
-
getSpectrum
-
setSpectrum
-