Skip to content

Commit adbba1f

Browse files
committed
clean
1 parent 2e5f2b6 commit adbba1f

File tree

4 files changed

+25
-10
lines changed

4 files changed

+25
-10
lines changed

gsplat/exclusive-cmn.go

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ package gsplat
22

33
import "gsbox/cmn"
44

5-
const CreaterIdOpen uint32 = 1202056903 // 创建者ID,开放版
6-
const ExclusiveIdOpen uint32 = 0 // 专属ID,开放版
7-
const CreaterIdPrd uint32 = 0 // 创建者ID,官方
8-
const ExclusiveIdPrd uint32 = 3141592653 // 专属ID,专业版
5+
const CreaterIdOpen uint32 = 1202056903 // 创建者ID,开放版
6+
const ExclusiveIdOpen uint32 = 0 // 专属ID,开放版
7+
const CreaterIdPrd uint32 = 0 // 创建者ID,官方
98

109
// 数据处理
1110
func ProcessDatas(datas []*SplatData) []*SplatData {
@@ -36,7 +35,7 @@ func CanParseExclusiveId(id uint32) bool {
3635
}
3736

3837
func IsPrdExclusiveId(id uint32) bool {
39-
return id == ExclusiveIdPrd
38+
return false
4039
}
4140

4241
func GetSpxOutputHeaderHash(bts []byte) uint32 {
@@ -51,6 +50,14 @@ func GetLodFlag() uint8 {
5150
return 0
5251
}
5352

53+
func WriteSpxV1(spxFile string, rows []*SplatData, comment string, shDegree uint8) {
54+
WriteSpxOpenV1(spxFile, rows, comment, shDegree)
55+
}
56+
57+
func ReadSpxV1(spxFile string, header *SpxHeader) (*SpxHeader, []*SplatData) {
58+
return ReadSpxOpenV1(spxFile, header)
59+
}
60+
5461
func WriteSpxV2(spxFile string, rows []*SplatData, comment string, shDegree uint8) {
5562
WriteSpxOpenV2(spxFile, rows, comment, shDegree)
5663
}
@@ -59,6 +66,14 @@ func ReadSpxV2(spxFile string, header *SpxHeader) (*SpxHeader, []*SplatData) {
5966
return ReadSpxOpenV2(spxFile, header)
6067
}
6168

69+
func WriteSpxV3(spxFile string, rows []*SplatData, comment string, shDegree uint8) {
70+
WriteSpxOpenV3(spxFile, rows, comment, shDegree)
71+
}
72+
73+
func ReadSpxV3(spxFile string, header *SpxHeader) (*SpxHeader, []*SplatData) {
74+
return ReadSpxOpenV3(spxFile, header)
75+
}
76+
6277
func DefaultSpxComment() string {
6378
return "created by gsbox " + cmn.VER + " https://github.com/gotoeasy/gsbox"
6479
}

gsplat/read-gs-spx.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ func ReadSpx(spxFile string) (*SpxHeader, []*SplatData) {
3232

3333
switch header.Version {
3434
case 1:
35-
return ReadSpxOpenV1(spxFile, header)
35+
return ReadSpxV1(spxFile, header)
3636
case 2:
37-
return ReadSpxOpenV2(spxFile, header)
37+
return ReadSpxV2(spxFile, header)
3838
case 3:
39-
return ReadSpxOpenV3(spxFile, header)
39+
return ReadSpxV3(spxFile, header)
4040
default:
4141
cmn.ExitOnError(errors.New("unsupport spx version: " + cmn.IntToString(int(header.Version))))
4242
return nil, nil

gsplat/write-gs-spx-v1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
// Deprecated
13-
func WriteSpxV1(spxFile string, rows []*SplatData, comment string, shDegree uint8) {
13+
func WriteSpxOpenV1(spxFile string, rows []*SplatData, comment string, shDegree uint8) {
1414
file, err := os.Create(spxFile)
1515
cmn.ExitOnError(err)
1616
defer file.Close()

gsplat/write-gs-spx-v3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"os"
99
)
1010

11-
func WriteSpxV3(spxFile string, rows []*SplatData, comment string, shDegree uint8) {
11+
func WriteSpxOpenV3(spxFile string, rows []*SplatData, comment string, shDegree uint8) {
1212
file, err := os.Create(spxFile)
1313
cmn.ExitOnError(err)
1414
defer file.Close()

0 commit comments

Comments
 (0)