Skip to content

Commit

Permalink
Improve Unity Doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
azrogers committed Dec 9, 2024
1 parent 6a86882 commit fbdaf3f
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
path = native~/extern/swl-variant
url = https://github.com/kring/swl-variant.git
branch = exception-public-inheritance
[submodule "Documentation/doxygen-awesome-css"]
path = Documentation/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
1 change: 1 addition & 0 deletions Documentation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reference/
33 changes: 18 additions & 15 deletions Documentation~/Doxyfile → Documentation/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,27 @@ PROJECT_NAME = "Cesium for Unity"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER =
PROJECT_NUMBER = $(npm_package_version)

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF = "Unlock the 3D geospatial ecosystem in Unity with real-world 3D content and a high accuracy full-scale WGS84 globe."
PROJECT_BRIEF =

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO = ./Documentation~/images/Cesium-128x128.png
PROJECT_LOGO = ./Documentation/images/Cesium-128x128.png

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = ./Documentation~/Reference
OUTPUT_DIRECTORY = ./Documentation/Reference

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
# sub-directories (in 2 levels) under the output directory of each output format
Expand Down Expand Up @@ -372,7 +372,7 @@ TOC_INCLUDE_HEADINGS = 5
# The default value is: DOXYGEN.
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.

MARKDOWN_ID_STYLE = DOXYGEN
MARKDOWN_ID_STYLE = GITHUB

# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
Expand All @@ -390,7 +390,7 @@ AUTOLINK_SUPPORT = YES
# diagrams that involve STL classes more complete and accurate.
# The default value is: NO.

BUILTIN_STL_SUPPORT = NO
BUILTIN_STL_SUPPORT = YES

# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
Expand Down Expand Up @@ -943,7 +943,10 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ./Runtime
INPUT = ./Runtime \
./Documentation/ \
./README.md \
./Reinterop~/README.md

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -1093,7 +1096,7 @@ EXAMPLE_RECURSIVE = NO
# that contain images that are to be included in the documentation (see the
# \image command).

IMAGE_PATH =
IMAGE_PATH = ./Documentation/images

# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
Expand Down Expand Up @@ -1154,7 +1157,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.

USE_MDFILE_AS_MAINPAGE =
USE_MDFILE_AS_MAINPAGE = ./README.md

# The Fortran standard specifies that for fixed formatted Fortran code all
# characters from position 72 are to be considered as comment. A common
Expand All @@ -1176,7 +1179,7 @@ FORTRAN_COMMENT_AFTER = 72
# also VERBATIM_HEADERS is set to NO.
# The default value is: NO.

SOURCE_BROWSER = NO
SOURCE_BROWSER = YES

# Setting the INLINE_SOURCES tag to YES will include the body of functions,
# classes and enums directly into the documentation.
Expand Down Expand Up @@ -1393,7 +1396,7 @@ HTML_STYLESHEET =
# documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET =
HTML_EXTRA_STYLESHEET = ./Documentation/doxygen-awesome-css/doxygen-awesome.css

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
Expand All @@ -1416,7 +1419,7 @@ HTML_EXTRA_FILES =
# The default value is: AUTO_LIGHT.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_COLORSTYLE = AUTO_LIGHT
HTML_COLORSTYLE = LIGHT

# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to
Expand Down Expand Up @@ -1717,7 +1720,7 @@ DISABLE_INDEX = NO
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

GENERATE_TREEVIEW = NO
GENERATE_TREEVIEW = YES

# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
# FULL_SIDEBAR option determines if the side bar is limited to only the treeview
Expand Down Expand Up @@ -2455,14 +2458,14 @@ ALLEXTERNALS = NO
# listed.
# The default value is: YES.

EXTERNAL_GROUPS = YES
EXTERNAL_GROUPS = NO

# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
# the related pages index. If set to NO, only the current project's pages will
# be listed.
# The default value is: YES.

EXTERNAL_PAGES = YES
EXTERNAL_PAGES = NO

#---------------------------------------------------------------------------
# Configuration options related to diagram generator tools
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Creating MonoBehaviours {#creating-monobehaviours}

Guidelines and tips for creating MonoBehaviours in Cesium for Unity.

## Avoid implementing non-static methods in C++
Expand Down Expand Up @@ -25,11 +27,11 @@ If you don't need C++-specific state, static methods are _much_ more efficient.

Carefully consider every field that you add to the class. In general, only the essential fields necessary to reconstruct the state of the object should by marked `[SerializeField]`. Cached and derived fields should instead be marked `[NonSerialized]`. Fields without any attribute should be extremely rare.

| *Characteristic* | *`[SerializeField]`* | *No attribute* | *`[NonSerialized]`* |
|-------------------------------|----------------------|--------------|-------------------|
| Saved / Loaded with the Scene ||||
| Preserved on script change / AppDomain reload ||||
| Transfers from Edit mode to Play mode ||||
| *Characteristic* | *`[SerializeField]`* | *No attribute* | *`[NonSerialized]`* |
| --------------------------------------------- | -------------------- | -------------- | ------------------- |
| Saved / Loaded with the Scene | | | |
| Preserved on script change / AppDomain reload | | | |
| Transfers from Edit mode to Play mode | | | |

## Backward compatibility

Expand Down
6 changes: 6 additions & 0 deletions Documentation/developer-resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Developer Resources {#developer-resources}

- \subpage developer-setup
- \subpage reinterop
- \subpage creating-monobehaviours
- \subpage release-guide
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Overview
# Developer Setup {#developer-setup}

This is a summary of the setup and workflows for developers who want to modify the Cesium for Unity plugin. If you just want to use Cesium for Unity in your own applications, see the main [README](../README.md).
<!--! [TOC] -->

## :computer: Building Cesium for Unity
## 🖥️ Building Cesium for Unity

### Prerequisites

Expand Down Expand Up @@ -38,7 +39,7 @@ git clone --recurse-submodules [email protected]:CesiumGS/cesium-unity.git com.cesi

Be sure to also clone the submodules. If you forgot the `--recurse-submodules` option when you cloned, run `git submodule update --init --recursive` inside the `com.cesium.unity` folder.

## Reinterop
## Reinterop {#reinterop-guide}

Reinterop is a Roslyn (C# compiler) source generator that is automatically invoked by Unity while compiling the Cesium for Unity C# code, and generates C# <-> C++ interop layer.

Expand Down
1 change: 1 addition & 0 deletions Documentation/doxygen-awesome-css
Submodule doxygen-awesome-css added at af1d90
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Releasing a new version of Cesium for Unity
# Releasing a new version of Cesium for Unity {#release-guide}

This is the process we follow when releasing a new version of Cesium for Unity on GitHub.
<!--! [TOC] -->

## Test the release candidate

Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
[![Cesium for Unity Logo](Documentation~/images/Cesium_for_Unity-Logo-WhiteBGH.jpg)](https://cesium.com/)
[![Cesium for Unity Logo](Documentation/images/Cesium_for_Unity-Logo-WhiteBGH.jpg)](https://cesium.com/)

Cesium for Unity enables building 3D geospatial applications and experiences with 3D Tiles and open standards using Unity 3D. By combining a high-accuracy full-scale WGS84 globe, open APIs and open standards for spatial indexing such as 3D Tiles, and cloud-based real-world content from [Cesium ion](https://cesium.com/cesium-ion) with Unity, this plugin enables rich 3D geospatial workflows and applications in Unity.

[Cesium for Unity Homepage](https://cesium.com/platform/cesium-for-unity?utm_source=github&utm_medium=github&utm_campaign=unity)

### :rocket: Get Started
### 🚀 Get Started

**[Download Cesium for Unity Samples](https://github.com/CesiumGS/cesium-unity-samples/releases/latest)**

**[Follow the Quickstart](https://cesium.com/learn/unity/unity-quickstart/)**

Have questions? Ask them on the [community forum](https://community.cesium.com/c/cesium-for-unity).

### :clap: Featured Demos
### 👏 Featured Demos

<a href="https://github.com/CesiumGS/cesium-unity-samples"><img src="Documentation~/images/cesium-for-unity-screenshot.jpg" width="48%" title="Cesium for Unity Samples" /></a>
[![](Documentation/images/cesium-for-unity-screenshot.jpg)](https://github.com/CesiumGS/cesium-unity-samples)

### :house_with_garden: Cesium for Unity and the 3D Geospatial Ecosystem
### 🏡 Cesium for Unity and the 3D Geospatial Ecosystem

Cesium for Unity streams real-world 3D content such as high-resolution photogrammetry, terrain, imagery, and 3D buildings from [Cesium ion](https://cesium.com/cesium-ion) and other sources, available as optional commercial subscriptions. The plugin includes Cesium ion integration for instant access to global high-resolution 3D content ready for runtime streaming. Cesium ion users can also leverage cloud-based 3D tiling pipelines to create end-to-end workflows to transform massive heterogenous content into semantically-rich 3D Tiles, ready for streaming to Unity.

Cesium for Unity supports cloud and private network content and services based on open standards and APIs. You are free to use any combination of supported content sources, standards, APIs with Cesium for Unity.

![Cesium for Unity Architecture](./Documentation~/images/integration-workflow_Unity.png)
![Cesium for Unity Architecture](Documentation/images/integration-workflow_Unity.png)

Using Cesium ion helps support Cesium for Unity development. :heart:
Using Cesium ion helps support Cesium for Unity development. ❤️

### :chains: Unity Integration
### ⛓️ Unity Integration

Cesium for Unity is tightly integrated with Unity making it possible to visualize and interact with real-world content in editor and at runtime. The plugin also has support for Unity game objects, physics, collisions, and character interaction. Leverage decades worth of cutting-edge advancements in Unity and geospatial to create cohesive, interactive, and realistic simulations and applications with Cesium for Unity.

### :green_book: License
### 📗 License

[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). Cesium for Unity is free for both commercial and non-commercial use.

### :computer: Developing Cesium for Unity
### 🖥️ Developing Cesium for Unity

See the [Developer Setup Guide](Documentation~/developer-setup.md) to learn how to set up a development environment for Cesium for Unity, allowing you to compile it, customize it, and contribute to its development.
See the [Developer Setup Guide](Documentation/developer-setup.md) to learn how to set up a development environment for Cesium for Unity, allowing you to compile it, customize it, and contribute to its development.
3 changes: 2 additions & 1 deletion Reinterop~/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Reinterop
# Reinterop {#reinterop}

Reinterop generates C# and C++ code to allow a .NET library to be seamlessly used from C++ code.
<!--! [TOC] -->

**Note: Reinterop currently requires the latest preview version of Visual Studio 2022, because it uses C# 11 / .NET 7. However, the generated code can be used almost anywhere, including in Unity's version of Mono.**

Expand Down
2 changes: 1 addition & 1 deletion Runtime/CesiumPropertyTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public Dictionary<String, CesiumMetadataValue> GetMetadataValuesForFeature(Int64
/// If the feature ID is out-of-bounds, the returned dictionary will be empty.
/// </para>
/// </remarks>
/// <param name="values">The dictionary of values that will be cleared and filled by this method.</param>
/// <param name="featureId">The ID of the feature.</param>
/// <returns>A dictionary of the property values mapped by property name.</returns>
public void GetMetadataValuesForFeature(Dictionary<String, CesiumMetadataValue> values, Int64 featureId)
{
values.Clear();
Expand Down
2 changes: 2 additions & 0 deletions Runtime/CesiumSimplePlanarEllipsoidCurve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static CesiumSimplePlanarEllipsoidCurve FromEarthCenteredEarthFixedCoordi
/// Creates a new <see cref="CesiumSimplePlanarEllipsoidCurve"/> object from a pair of
/// Ellipsoid-Centered, Ellipsoid-Fixed coordinates describing the beginning and end points of the curve.
/// </summary>
/// <param name="ellipsoid">The ellipsoid to use for this curve.</param>
/// <param name="sourceEcef">The start point of the curve.</param>
/// <param name="destinationEcef">The end point of the curve.</param>
/// <returns>
Expand All @@ -46,6 +47,7 @@ public static CesiumSimplePlanarEllipsoidCurve FromCenteredFixedCoordinates(Cesi
/// Creates a new <see cref="CesiumSimplePlanarEllipsoidCurve"/> object from a pair of cartographic
/// coordinates (Longitude, Latitude, and Height) describing the beginning and end points of the curve.
/// </summary>
/// <param name="ellipsoid">The ellipsoid to use for this curve.</param>
/// <param name="sourceLlh">The start point of the curve.</param>
/// <param name="destinationLlh">The end point of the curve.</param>
/// <returns>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"url": "https://cesium.com"
},
"scripts": {
"doxygen": "doxygen ./Documentation~/Doxyfile"
"doxygen": "doxygen ./Documentation/Doxyfile"
},
"changelogUrl": "https://github.com/CesiumGS/cesium-unity/blob/main/CHANGES.md",
"documentationUrl": "https://cesium.com/learn/unity/",
Expand Down

0 comments on commit fbdaf3f

Please sign in to comment.